-
Bug
-
Resolution: Duplicate
-
None
-
23w44a
-
None
-
Unconfirmed
-
(Unassigned)
The bug
/locate biome does not work when run from a position above or below the world bounds, even though the biome could be found with no extra computation compared to an execution position inside the world bounds.
The reproduction steps
- Run /locate biome minecraft:ocean and teleport to the ocean
- Run /execute positioned ~ 320 ~ run locate biome minecraft:ocean and note how it finds the ocean
- RunĀ /execute positioned ~ 321 ~ run locate biome minecraft:ocean and note how it fails to find the ocean
The consequences
This bug is most noticeable when running a command like the following:
/execute positioned ^ ^ ^100000 run locate biome #minecraft:has_structure/stronghold
This command will fail to locate anything unless the player's y rotation is 0 or very nearly so, since the specified position will otherwise be well above or below the world bounds.
The fix
If the y value were clamped to these bounds before the location algorithm began, the command would work and there would be no negative side effects (theoretically a biome slightly further from the actual execution position could be found, but this would have no negative impact on anything). This should be trivial to implement, although care should be taken to ensure that the distance returned (listed in chat and stored in the command result) is with regard to the unclamped y value.
Misc
This issue could be considered a clone of MC-238604.
- duplicates
-
MC-254052 /locate doesn't work outside build limit
- Open