this duplication bug works in snapshot 15w38a and lower. pls fix it
Related issues
Attachments
Comments


I confirmed the bug.
Unless I am mistaken, it only happens in creative.

Background info: The server doesn't actually remove hover-dropped (with or without ctrl, doesn't matter) items from the inventory presumably because in creative, everywhere but the survival inventory and hotbar, stacks are supposed to be infinite as part of the block palette. The client wrongly assumes the item is gone because that's the behavior it expects from the server - desync happens here. When the item stack is picked up, the server tells the client which inventory slots to update, specifically it only tells the client which slots changed. With non-full stacks, every slot will be updated and the items will be duplicated. With full stacks, the slot the stack was dropped from will not change (from the server's POV) and no slot update information will be sent for that slot, which is why this doesn't appear to work with full stacks (it actually does, we'll get to that in a bit). With non-full stacks, both inventory slots will change and both will update on the client. The reason you don't notice the full stack (the one you dropped but wasn't actually removed by the server) doesn't appear when interacting with that slot is because the server is very trusting towards creative clients, a separate issue which I won't get into any further here.
Now, here is how you can verify that this affects full stacks as well:
1. Be in creative, /clear to make sure your inventory is empty
2. /give @p stone 64
3. Hover-drop the stack
4. Pick up the stack from the ground (Note how they now go in the second hotbar slot, the first slot is occupied with the client-invisible original stack)
5. Run /clear, note how 128 items have been cleared from your inventory
Note that this means this issue is not specific to the off-hand slot. Also, because this is creative, I don't think this ticket needs to stay private - items are infinite here anyway.
Hope this helps.
—
I will also take this opportunity to draw some attention to MC-22882/MC-80476 - these issues made it very frustrating for me to test this issue 😃
tl;dr: Hover-dropped items aren't removed from the inventory server-side.