Ctrl Pick Block gives new item even if picked item already exists in inventory
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.
Code analysis
Code analysis by Marcono1234 in this comment.
Linked Issues
- Fixed
Dan Taylor
[Mojang] Gegy
- 13
- 8
- Confirmed
- Inventory
- NBT ctrl pick-block
15w33c - 1.21
15w33c 15w44b 1.9-pre2 1.9-pre3 1.9-pre4 1.9 1.9.1-pre1 1.9.1-pre3 1.9.2 1.9.3-pre2 1.10.2 16w33a 16w44a 1.11-pre1 1.11 16w50a 1.11.1 1.11.2 17w06a 17w13b 17w15a 17w16b 17w17b 17w18b 1.12-pre2 1.12.1 1.12.2 18w15a 1.15.2 1.16-rc1 1.16 1.16.1 1.16.2-pre1 1.16.2-pre2 1.16.2-rc1 1.16.2 20w46a 21w03a 1.16.5 21w05b 21w06a 21w07a 21w08b 1.19.2 1.20.4 24w09a 1.21- 24w44a
Created Issue:
Ctrl + Mouse3 on a block with NBT tags gives more than one
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.
Environment
Java 8 Update 45 (64-bit)
Windows 7
Ctrl Ctrl+Mouse3 Mouse3 NBT-tags PickBlock
Ctrl + Mouse3
Ctrl+ Mouse3 on a block with NBT tags gives more than oneCtrl Pick Block gives new item even if picked item already exists in inventory
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.
Code analysis by Marcono1234 in this comment .
is duplicated by
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.
Code analysis by Marcono1234 in this comment.
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.
Code analysis
Code analysis by Marcono1234 in this comment.
Java 8 Update 45 (64-bit)
Windows 7






confirmed for 1.9 pre-2
Still in 1.9-pre3
Still in 1.9-pre4
Still in 1.9.1-pre1
Still in 1.9.1-pre3
Still in 1.9.3-pre2
Please link to this comment in the description
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.
Can confirm for MC 1.12.1.
Confirmed in 1.16-pre5.
Confirmed in 1.15.2 and 1.16 Release Candidate 1.
In 1.16.1
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 1.16.5 and 21w08b.