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

Eye of Ender does not always lead to the nearest Stronghold

XMLWordPrintable

    • Confirmed

      When throwing an Eye of Ender it does not always lead you to the nearest structure due to a typo in the method for that.

      What I expected to happen:
      I expected the Eye of Ender to always lead to the nearest stronghold

      What actually happend:
      It sometimes shows a stronghold farther away

      Steps to reproduce:
      Easy way:
      1. Create a superflat world with the preset
      2;7,2x3,2;1;stronghold(distance=10 count=10 spread=10)
      2. Teleport to 0 10 0
      3. Fly close to a Stronghold
      4. Throw Eyes of Ender
      5. From some points they will not lead to the Stronghold you are closest to.

      Harder way to prove it's not due to the preset or flatworlds:
      1. Create a world with the seed 3351546583236556057 (Creative, so you can teleport and fly)
      2. Teleport to -515 80 601 so it generates the stronghold at that position
      3. Teleport to 693 80 269 and dig down until you find the stronghold (At y=44)
      4. Throw Eyes of Ender

      Why it happens:
      In the structure class, where it tries to find the nearest instance it calculates the distance as
      d2 = i + i * j * j + k * k;
      where it should be
      d2 = i * i + j * j + k * k;
      In 1.5 it is in the agm class in lines 145 and 164.

            Unassigned Unassigned
            ferd Ferd Erik
            Votes:
            10 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: