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

/item may duplicate items creating 'ghost items' the game releaves

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 20w46a, 21w10a, 21w14a, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Community Consensus
    • Category:
      Data Packs
    • Mojang Priority:
      Normal

      Description

      Hi! I was working with a datapack for 1.17 (the one I uploaded here) to resolve a bug of the datapack. I found a minecraft bug. It seems /item could duplicate items and create strange ghost items. As you can see in the screenshots, if I check for the existence of the backpack item the game returns true, and if I ask the nbt it gives me the nbt of the item. However, that item should be there, but not 'ghost' and the other backpack(in my inventory) should exist. In this way, the command duplicates(not always) the items.
      Do you want to check? Try this datapack, maybe with resource pack (search on the web for it, Backpacks Datapack). Give you a backpack with /loot give @s loot ulg:backpack/backpack or craft it. Place it in the off hand, right click, go to your inventory. Take the opened backpack to a slot of the inventory(not the hotbar slots). It will return on your second hand. Try again and again putting it in the inventory. At a moment, it will not return to the second hand. Now try checking for the item using /data get or predicates, or if data o [nbt={}] arg. You'll find it.
      Take an item in your hotbar, select it and press F or the switch item button you have.
      You will have successfully duplicated the backpack.

      I don't know how to explain it, but at least I can post this try datapack and make you check and study the problem. For a better and less-laggy minecraft. Thanks

      Steps to Reproduce: (from Calverin)

      1.  /scoreboard objectives add drop minecraft.dropped:minecraft.dirt`
        

      2. In a repeating command block, put

       /execute as @a[scores=
      {drop=1..}] run item replace entity @s weapon.mainhand with dirt
      

      3. In an always active chain command block after the last repeating one, put

       /scoreboard players reset @a drop
      

      4. Power the repeating command block
      5. In any game mode aside from spectator, drop a block of dirt, after the first block, you should receive a new "ghost" dirt block that is invisible and upon dropping behaves like a normal item.

        Attachments

        1. image-2020-11-19-15-09-45-202.png
          1.40 MB
          UltroGhast
        2. image-2020-11-19-15-13-34-609.png
          2.07 MB
          UltroGhast

          Issue Links

            Activity

              People

              Assignee:
              boq [Mojang] Bartosz Bok
              Reporter:
              UltroGhast UltroGhast
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: