Class: Block
Represents a block in a dimension. A block represents a unique X, Y, and Z within a dimension and get/sets the state of the block at that location. This type was significantly updated in version 1.17.10.21.
Constructors
new Block()
private
new Block():Block
Returns
Properties
dimension
readonly
dimension:Dimension
Remarks
Returns the dimension that the block is within.
isAir
readonly
isAir:boolean
Remarks
Returns true if this block is an air block (i.e., empty space).
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
isLiquid
readonly
isLiquid:boolean
Remarks
Returns true if this block is a liquid block - (e.g., a water block and a lava block are liquid, while an air block and a stone block are not. Water logged blocks are not liquid blocks).
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
isSolid
Beta
readonly
isSolid:boolean
Remarks
Returns true if this block is solid and impassible - (e.g., a cobblestone block and a diamond block are solid, while a ladder block and a fence block are not).
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
isWaterlogged
Beta
readonly
isWaterlogged:boolean
Remarks
Returns or sets whether this block has a liquid on it.
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
location
readonly
location:Vector3
Remarks
Coordinates of the specified block.
Throws
This property can throw when used.
permutation
readonly
permutation:BlockPermutation
Remarks
Additional block configuration data that describes the block.
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
type
Beta
readonly
type:BlockType
Remarks
Gets the type of block.
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
typeId
Beta
readonly
typeId:string
Remarks
Identifier of the type of block for this block.
Throws
This property can throw when used.
LocationOutOfWorldBoundariesError
x
readonly
x:number
Remarks
X coordinate of the block.
y
readonly
y:number
Remarks
Y coordinate of the block.
z
readonly
z:number
Remarks
Z coordinate of the block.