CPacketRecipePlacement can convert items
Based on 1.12 decompiled using MCP 9.40 PRE 1
The bug
The packet CPacketRecipePlacement can convert any item into a different one the player has in their inventory. This is possible by using the "from open container to inventory" item movement and specifying a destination which is already occupied by another item. Since the item type is not tested the item count is just increased, even if the moved item is a different one.
Ways to reproduce
Vanilla client - video
- Fill your inventory with at least 5 stacks of wooden planks
- Face down
- Drop diamond on the ground
- Spam click the recipe for crafting table
→ The diamonds will be duplicated when picked up
Modded client
- Set the integer slot in CPacketRecipePlacement.ItemMove to 8
- Prepare your inventory as shown in 2017-07-06_01.11.38.png

- Press any item in the recipe book that does not involve the item in the crafting grid (ex. bed)
→ The items in slot 8 should have increased by the amount of items in the crafting grid
Note: The 16 logs are client side