Skip to main content

Module position

Module position 

Source
Expand description

Block positions packed into 64 bits.

The packing changed in 1.14: before it the layout (high to low bits) is x:26 | y:12 | z:26, from 1.14 on it is x:26 | z:26 | y:12. The generated packet code picks the right function for its version; BlockPos itself is version-agnostic.

Structs§

BlockPos
A block position. x/z must fit 26 signed bits, y 12 signed bits to be encodable.

Enums§

PositionLayout
Bit layout of a packed BlockPos.