Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w07b, Minecraft 18w09a, Minecraft 18w10d, Minecraft 18w14b, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, 1.14.4, 1.15 Pre-release 6, 1.15.1, 20w21a, 1.16 Pre-release 4, 1.16 Pre-release 6, 1.16, 1.16.4, 20w48a, 20w51a, 1.16.5, 21w05b, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1, 21w41a, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 4, 1.18 Pre-release 5, 1.18 Pre-release 6, 1.18 Pre-release 8, 1.18 Release Candidate 1, 1.18 Release Candidate 3, 1.18.1, 1.19, 1.19.1
Picking up only a part of an item stack of an item entity because your inventory is nearly full is not correctly detected by the server causing:
- Missing statistics change
- Missing sound and animation
- Item stack of item entity not updated
It's easiest to reproduce this by starting in creative mode and then switching to survival partway through.
- Fill all of your inventory except for the first hotbar slot with one item (e.g. wooden swords), fill the hotbar slot with a nearly full stack of for example stone
- Switch to survival mode (This is needed because in creative you can pick items up even when the inventory is full.)
- Summon an item entity containing two stone items
→ The item entity still shows two items, there was no sound, no animation, etc.
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.entity.item.EntityItem.onCollideWithPlayer(EntityPlayer) tests if net.minecraft.entity.player.InventoryPlayer.addItemStackToInventory(ItemStack) returns true. Since this is only the case if the complete stack was picked up, it should instead test if the stack size decreased.
The following shows the problems with the current code: