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

Function reward removing the item an advancement detected creates a ghost item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Release Candidate 1, 1.16, 1.16.1, 1.16.2, 1.16.4, 20w51a, 1.16.5
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Advancements, Commands, Data Packs, Networking
    • Mojang Priority:
      Normal

      Description

      The bug

      When a function reward of an advancement that triggers on inventory_changed removes the item, the advancement detected, the item is left behind has a ghost item on the client.
      Presumably, that happens because of when in the tick the advancement triggers. It is likely, that the advancement triggers before the item is being send to the client, and then the inventory updates are send in the wrong order.

      How to reproduce

      1. Download the example datapack: Advancement Ghost Item Bug.zip
      2. Put the datapack into your world's datapack directory
      3. Give yourself a vine
      4. Make sure you are in survival mode (in creative the ghost item will behave like a regular item)
        You now have a ghost vine in your inventory

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Schortan [Mod] NeunEinser
              Votes:
              13 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: