block

val Location.block: Block

Gets the Block at this Location's block coordinates.

This property retrieves the block at the integer block coordinates (blockX, blockY, blockZ) of this Location in its world.

Example:

val location = Location(world, 10.5, 64.8, -20.3)
val block = location.block // Gets block at (10, 64, -20)

Return

The Block at this Location's block coordinates