BlockPos
Represents a block in the world.
new BlockPos(double x, double y, double z)
new BlockPos(double x, double y, double z)
Floors the coordinates and creates a new BlockPos
object.
getX(): int
getX(): int
Returns the x
position of the block.
getY(): int
getY(): int
Returns the y
position of the block.
getZ(): int
getZ(): int
Returns the z
position of the block.
up(): BlockPos
up(): BlockPos
Returns a new BlockPos
object representing the position directly above the current block.
down(): BlockPos
down(): BlockPos
Returns a new BlockPos
object representing the position directly below the current block.
north(): BlockPos
north(): BlockPos
Returns a new BlockPos
object representing the position to the north of the current block.
south(): BlockPos
south(): BlockPos
Returns a new BlockPos
object representing the position to the south of the current block.
east(): BlockPos
east(): BlockPos
Returns a new BlockPos
object representing the position to the east of the current block.
west(): BlockPos
west(): BlockPos
Returns a new BlockPos
object representing the position to the west of the current block.
isReplaceable(): boolean
isReplaceable(): boolean
Determines if the block at the current position is replaceable in the world context.
isSolid(): boolean
isSolid(): boolean
Checks if the block at the current position is a full block, indicating solidity.
isAir(): boolean
isAir(): boolean
Checks if the block at the current position is an air block.
getBlockId(): int
getBlockId(): int
Returns the unique block ID of the block at the current position.
A list of all the block ids can be found on this website.
getHardness(): float
getHardness(): float
Retrieves the hardness value of the block at the current position, reflecting how long it takes to break
Last updated