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

"thrown_item_picked_up_by_entity" advancement trigger is triggered when a player drops an item and the same player picks it back up

XMLWordPrintable

    • Unconfirmed
    • Advancements

      The bug

      Although the thrown_item_picked_up_by_entity advancement trigger now works for players, it is triggered when a player drops an item and the same player picks it back up.

      The bug is caused by the fix for MC-185095.

      How to reproduce

      1. Download and then install the data pack below for easier reproduction.
      2. Observe the following advancements and functions below:
        {
          "criteria": {
            "thrown_item_picked_up_by_entity": {
              "trigger": "thrown_item_picked_up_by_entity"
            }
          },
          "rewards": {
            "function": "game:thrown_item_picked_up_by_entity"
          }
        }
        
        advancement revoke @s only game:thrown_item_picked_up_by_entity
        tellraw @s ["",{"selector":"@s"}," picked up an item"]
        
      3. Drop any item and then pick it back up.
        You will notice that the advancement is granted even if you are the same player that dropped the item.

      Fix

      A suggested fix would be to check if the UUID of the player that picks up the item matches that of the Thrower NBT tag of the item entity if any. If it does, then the advancement trigger should not be triggered for the player that drops the item.

            Unassigned Unassigned
            jirauser283547 user-a4a49 (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: