Ctrl Pick Block gives new item even if picked item already exists in inventory
Resolved
Fixed
13
The bug
When I hold CTRL then click MOUSE3 (Mouse Scroll), it gives me more than one of the same, and changes my selected item to the furthest block on the right, that I chosen with CTRL+MOUSE3. I've only tried this on the chest, furnace, and command block.
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The problem is that creating the item and adding it to the inventory is done client side. The client however does not know the tile entity data and therefor only uses the default data. This means that a chest gets client side the NBT data Items:[] even if it contains items and therefor does not stack with an existing chest. When the server then receives the CPacketCreativeInventoryAction packet it adds the correct information to the item.
Note: Besides that the method net.minecraft.client.Minecraft.storeTEInStack(ItemStack, TileEntity) does not remove the tile entity coordinates x, y and z.
confirmed for 1.9 pre-2