Ghost items produced with "hasitem" and "give"
How to reproduce
1. Run this command in a repeating command block
give @a[hasitem={item=apple,quantity=0,location=slot.inventory}] diamond
2. Get an apple and start moving it around your inventory
Expected behavior
Totally normal inventory management
Observed behavior
Ghost items appear: when you try to place the apple down, you get a second fake apple that disappears when placed again.