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

BlockPattern WitherBoss (and others) can be built incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 1.8, Minecraft 1.8.6, Minecraft 15w31a, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w44a, Minecraft 1.11.2, Minecraft 17w13b, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 18w07a, Minecraft 18w11a, Minecraft 18w20c, Minecraft 18w22c, Minecraft 1.13-pre2, Minecraft 1.13-pre5, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, 1.16.2, 1.17.1
    • None
    • Confirmed
    • Block states

      The bug

      The BlockPattern class is incorrectly matching blocks that aren't including the block being placed by the player.

      Proof

      In the screenshots provided, if you replace the red wool block with a wither skull the wither will be detected and spawned, even though the pattern matched was not comprised of the block the player placed.

      Possible fix

      Instead of using a block iterator iterating over all blocks in a cube (of size 3 for the wither as it is the max(width,height,depth) the BlockPattern class should be iterating over the inverted offsets of the BlockPattern. (e.g. translateOffset(position, face1, face2, -i, -j, -k))

      (an optimization is to skip Predicates.alwaysTrue() and or unplaceable blocks).

      There is a second bug that I am having troubles replicating, but involves modded minecraft where as the above is reproducible in vanilla. The second issue is involved with asymmetrical block patterns.

        1. 2014-11-11_02.02.03.png
          2014-11-11_02.02.03.png
          436 kB
        2. 2014-11-11_02.02.08.png
          2014-11-11_02.02.08.png
          422 kB
        3. 2014-11-12_21.54.35.png
          2014-11-12_21.54.35.png
          953 kB
        4. 2014-11-12_21.54.45.png
          2014-11-12_21.54.45.png
          1016 kB
        5. 2014-11-12_21.55.01.png
          2014-11-12_21.55.01.png
          994 kB
        6. 2014-11-12_21.55.13.png
          2014-11-12_21.55.13.png
          993 kB
        7. 2014-11-12_21.55.44.png
          2014-11-12_21.55.44.png
          960 kB
        8. 2014-11-12_21.55.56.png
          2014-11-12_21.55.56.png
          983 kB
        9. 2014-11-12_21.56.39.png
          2014-11-12_21.56.39.png
          755 kB
        10. 2014-11-12_21.56.56.png
          2014-11-12_21.56.56.png
          784 kB
        11. 2014-11-12_21.57.20.png
          2014-11-12_21.57.20.png
          637 kB
        12. 2016-05-13_19.35.28.png
          2016-05-13_19.35.28.png
          956 kB
        13. world - Copy.zip
          2.16 MB

            Unassigned Unassigned
            ryan_the_leach Ryan Leach
            Votes:
            14 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: