BlockState
Implements
Index
Constructors
constructor
Constructs new BlockState object from given ID and data.
Parameters
id: number
data: number
Returns BlockState
Properties
readonlydata
Data of the block.
readonlyid
Numeric ID of the block.
Methods
addState
Adds state to the following object.
Parameters
state: number
value: number
Returns BlockState
BlockState object itself.
addStates
Adds states to the following object from given JS object instance.
Parameters
states: object
Returns BlockState
BlockState object itself.
addStatesMap
Adds states to the following object from given map instance.
Parameters
states: Map<unknown, number>
Returns BlockState
BlockState object itself.
equals
Parameters
object: any
Returns boolean
Whether the following object is equal to given, according to different parameters.
getData
Returns number
Data of the block.
getId
Returns number
ID of the block.
getNamedStates
Returns Map<string, number>
All named states from following object in java.util.Map instance.
getNamedStatesScriptable
Returns {}
All named states from following object in JS object instance.
[key string]: number
getRuntimeId
Returns number
ID of the blockstate in runtime.
getState
Parameters
state: number
Returns number
State of the given number if it's present in the following object.
getStates
Returns Map<number, number>
All states from following object in java.util.Map instance.
getStatesScriptable
Returns {}
All states from following object in JS object instance.
[key string]: number
hasState
Parameters
state: number
Returns boolean
Whether the state by given number is present in the following object.
isValidState
Returns boolean
Whether the state is valid.
Class to work with vanilla blocks parameters.
2.2.1b89