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

Arrows that are "deflected" suddenly allow being picked up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21
    • None
    • Unconfirmed
    • (Unassigned)

      Expected Behavior

      If I set the pickup status to DISALLOWED, it should stay that way despite hitting something which deflects the projectile. This was the behavior in <=1.20.4

      Observed Behavior

      If the summoned arrow, hits a player and deflects off, once it hits the ground, it's pickup status has been changed to ALLOWED

      Steps to Reproduce

      1. Use the command and move out of the way of the arrow
        /summon arrow ~ ~10 ~ {pickup:0b,Owner:[I; -2072785729, 1902920055, -1858696354, -1725573379]}
      1. A player in survival cannot pick it up
      2. Run the command again (in creative mode) and let it hit you and then hit the ground
      3. A player in survival can pick it up

      Other Information

      This is caused by the the logic which resets the owner of projectiles upon deflection. AbstractArrow overrides setOwner to change the pickup status, and Projectile#deflect calls setOwner.

            Unassigned Unassigned
            Machine Maker Jake Potrebic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: