Module position

Source
Expand description

Representations of positions of various things in Minecraft.

The most common ones are Vec3 and BlockPos, which are usually used for entity positions and block positions, respectively.

Structsยง

BlockPos
The coordinates of a block in the world. For entities (if the coordinate have decimals), use Vec3 instead.
ChunkBlockPos
The coordinates of a block inside a chunk.
ChunkPos
Chunk coordinates are used to represent where a chunk is in the world. You can convert the x and z to block coordinates by multiplying them by 16.
ChunkSectionBlockPos
The coordinates of a block inside a chunk section. Each coordinate must be in the range [0, 15].
ChunkSectionPos
The coordinates of a chunk section in the world.
GlobalPos
A block pos with an attached world
Vec3
Used to represent an exact position in the world where an entity could be.