Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-266413

/locate biome does not work when run from above or below the world

XMLWordPrintable

    • Icon: Bug 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

      1. Run /locate biome minecraft:ocean and teleport to the ocean
      2. Run /execute positioned ~ 320 ~ run locate biome minecraft:ocean and note how it finds the ocean
      3. 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.

            Unassigned Unassigned
            clamlol [Helper] clam lol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: