ground Position

Get the position of ground under the position you give.

positions.groundPosition(pos(0, 0, 0));

This finds the ground under the position you say and returns the coordinates of the closest air block above it. If the given block is solid, the next air block under it is found and the the search for ground starts from there. Liquids are considered as solids for purposes of finding ground.

Parameters

  • pos: the position to start from to find ground.

Returns

  • a position that is considered ground and is closest to the position you gave.

Example

Teleport the player to the nearest ground position from (0, 0, 0).

player.teleport(positions.groundPosition(pos(0, 0, 0)))

See Also

||positions:create world||