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

Reentering the world makes arrows able to pierce through more entities than the "PierceLevel" tag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 1.20.5 Release Candidate 2
    • None
    • Confirmed
    • Projectiles, Save Data
    • Low
    • Platform

      During the flight of an arrow (with its tag "PierceLevel" set to X, X > 0), exiting and reentering the world enables it to pierce through another X+1 entities, regardless how many entities it has hit before exiting the world.

      In my following example, I froze the game (/tick freeze) in order to perform actions more precisely.

      Steps to Reproduce:

      1. Use a bow or crossbow with enchantment "Piercing" to shoot an arrow (or any way to summon an arrow with its tag "PierceLevel" bigger than 0). Assume the value in its tag "PierceLevel" is X.
      2. Make it hit some entities, but not more than X, or it will directly vanish. The arrow must still be flying, or the "PierceLevel" tag will be reset to 0.
      3. Exit the world.
      4. Reenter the world.

      Actual Result:

      The arrow can now again hit another X+1 entities, as if it has not hit any entities.

      As shown in following images, the arrow hit all 7 creepers despite the fact that its tag "PierceLevel" is only 4.

      Expected Result:

      The arrow should vanish as soon as it hits X entities in total.

      Possible Cause:

      The number of entities the arrow pierced through is recorded in the RAM, so it is reset when reentering the world. The value of tag "PierceLevel" is never changed, which make it theoretically possible for the arrow to hit infinite number of entities by repeating the steps mentioned above.

      Possible Solution:

      Decrease the value in the tag "PierceLevel" by 1 each time the arrow hits an entity. Delete the arrow once the value reaches -1.

        1. 1) PierceLevel is 4, arrow hasn't hit any entities.png
          194 kB
          TheUknownCreator
        2. 2) arrow hit 4 entities, exit the world.png
          198 kB
          TheUknownCreator
        3. 3) reenter the world, arrow pierced through another 3 entities.png
          240 kB
          TheUknownCreator
        4. example.mkv
          3.42 MB
          TheUknownCreator

            Unassigned Unassigned
            TheUknownCreator TheUknownCreator
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: