BlockPos
A block position.
Constructors
Constructor
new BlockPos(
x,y,z):BlockPos
Parameters
x
number
y
number
z
number
Returns
BlockPos
Properties
posX
readonlyposX:number
Gets the X coordinate.
posY
readonlyposY:number
Gets the Y coordinate.
posZ
readonlyposZ:number
Gets the Z coordinate.
Methods
down()
down():
BlockPos
Gets the BlockPos one block down.
Returns
BlockPos
east()
east():
BlockPos
Gets the BlockPos one block east.
Returns
BlockPos
getBlockId()
getBlockId():
number
Gets the block ID at this position.
Returns
number
getHardness()
getHardness():
number
Gets the hardness of the block at this position.
Returns
number
isAir()
isAir():
boolean
Checks if the block at this position is air.
Returns
boolean
isReplaceable()
isReplaceable():
boolean
Checks if the block at this position is replaceable.
Returns
boolean
isSolid()
isSolid():
boolean
Checks if the block at this position is solid.
Returns
boolean
north()
north():
BlockPos
Gets the BlockPos one block north.
Returns
BlockPos
south()
south():
BlockPos
Gets the BlockPos one block south.
Returns
BlockPos
up()
up():
BlockPos
Gets the BlockPos one block up.
Returns
BlockPos
west()
west():
BlockPos
Gets the BlockPos one block west.
Returns
BlockPos
Last updated