The following is based on a decompiled version of Minecraft 1.8 using MCP. All method and class names are the ones used in the decompiled version.
The bug
The method public EntityItem dropPlayerItemWithRandomChoice(ItemStack itemStackIn, boolean p_71019_2_) of the class net.minecraft.entity.player.EntityPlayer is used to drop items while having a container GUI open or when you get an item but have no space in your inventory.
This happens under multiple circumstances, for example when you press "Q" (or the key you assigned) while having a container GUI open or when you close your inventory while you have items placed in the crafting grid. This is report is about the latter one. In 1.8 all cases except player is pressing "Q" are handled as item was not dropped by player, but in my opinion that is not correct.
Affected situations
Closing GUI
net.minecraft.inventory.Container(Item in hand)net.minecraft.inventory.ContainerEnchantmentnet.minecraft.inventory.ContainerMerchantnet.minecraft.inventory.ContainerPlayer(2x2 crafting grid)net.minecraft.inventory.ContainerRepairnet.minecraft.inventory.ContainerWorkbench
Using item
net.minecraft.item.ItemBucketnet.minecraft.item.ItemEmptyMapnet.minecraft.item.ItemGlassBottle
Other
net.minecraft.inventory.SlotCrafting❓net.minecraft.entity.passive.EntityCow(Milking)
How to reproduce (closing container)
Place an enchanting table
Place a book in your hotbar
Fill all other slots with a different item (e.g. stone); with one stack having more than one item
Open the enchanting table
Place the book in the corresponding slot
Fill the now free slot in your inventory with the spare item from step 3
Close the enchanting table (by pressing
EorEsc)
✔ The book is thrown out because there is no space in your inventoryInspect the item entity data
/data get entity @e[type=item,limit=1] Thrower❌ It has no thrower even though you threw it (passively)
Only checked this for 20w07a for the case described in the (now added) reproduction steps.