mojira.dev
MC-263734

An inventory_changed advancement clearing a mouse held item in creative creates a ghost item

Steps to reproduce:
1. run the game on a server or in singleplayer (tested both)
2. Set up the following advancement:

inv_change.json

 
{
    "criteria": {
      "change": {
        "trigger": "minecraft:inventory_changed"
      }
   },
    "rewards": {
      "function": "test:clear_item"
    }
  }

 which runs:

clear_item.mcfunction

clear @s lime_terracotta
give @s lime_terracotta
advancement revoke @s only test:inv_change

3. in creative, take the lime terracotta with your mouse.
as clear works in adventure/survival, the item is cleared from your mouse,
however, you keep a ghost clone of the item, which can't be used placed etc.

Linked issues

Comments 1

The ghost item is created by the /clear execution that is triggered by placing the item back into the inventory; see MC-187281.

paulo khayat

(Unassigned)

Unconfirmed

(Unassigned)

1.20.1

Retrieved