mojira.dev
MC-298522

/locate structure minecraft:stronghold distance calculation incorrect near world border (1.21.5)

When using /locate structure minecraft:stronghold near the world border (around X/Z = ±29,999,900), the reported distance to the stronghold is incorrectly calculated.

The command still locates a stronghold (around X/Z = 26,000), but the reported "blocks away" value is completely wrong.
For example:

  • At X/Z ~29,999,900 it sometimes says "0 blocks away", which is impossible.

  • Slightly moving the player may show distances like 30,000 blocks away.

  • Moving back toward the center (e.g. ~28 million) gives other incorrect values (such as 36,000 blocks away).

  • The issue does not happen with other structures. It’s tested with minecraft:desert_temple on another world and response was %100 accurate. Temple was ~2500 blocks away from the player’s current location with player being close to world border.

Steps to Reproduce:

  1. Create a world in version 1.21.5 (vanilla).

  2. Teleport to the world border (e.g. /tp @p 29999900 ~ ~).

  3. Run /locate structure minecraft:stronghold.

  4. Observe the reported "blocks away" distance — it is incorrect.

  5. Move slightly and run the command again — the distance changes inconsistently.

Expected Result:
The game should correctly calculate and report the distance from the player to the located stronghold — especially near the world border.

Actual Result:
The reported distance is completely incorrect (sometimes "0 blocks away", sometimes inconsistent).

Additional Notes:

  • No error message appears — this is purely an incorrect distance calculation.

  • The issue seems to only affect strongholds — other structures report correct distances.

  • I have recorded a video clearly showing the problem (unedited). It’s attached to this report.

Environment

Windows 11, Java Edition 1.21.5, Singleplayer, completely vanilla

Attachments

Comments 3

Thats weird, what I know is that it is basically a calculation error with position to position differences

I actually have no idea on how this can be a game-breaking error, but it’s an ovbious one.

Eren Köse

(Unassigned)

Confirmed

Commands

1.21.5, 25w32a

Retrieved