Block with a negative Z
- Input
- X 27, Z -15
- Expected output
- Chunk (1, -1), posição (11, 1) / chunk (1, -1), position (11, 1)
This is the wiki example: 27 / 16 rounds down to 1 and -15 / 16 rounds down to -1.
how to find chunk coordinates minecraft
To edit a world, size a farm or repair a file you need the chunk and region of a point. The math is short, but negative coordinates often trip people up. The calculator below opens with an example that has a negative X.
This is the wiki example: 27 / 16 rounds down to 1 and -15 / 16 rounds down to -1.
Also wiki examples: floor(30 / 32) = 0 and floor(-3 / 32) = -1.
Divide the X or Z coordinate by 16 and round down. The position inside the chunk is the coordinate mod 16, from 0 to 15. For example, the block at X 27, Z -15 is in chunk (1, -1) at position (11, 1).
Because the math uses floor, which rounds down. -1 / 16 is -0.0625 and becomes -1. Truncating toward zero would give 0 and get every negative block wrong.
Work out the chunk, divide each axis by 32 rounding down and build the name r.x.z.mca. The calculator does it and also shows the block range the region covers.
-16, 64, 57Chunk -1, 3