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 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.
- net.minecraft.inventory.Container (Item in hand)
- net.minecraft.inventory.ContainerPlayer (2x2 crafting grid)
- net.minecraft.entity.passive.EntityCow (Milking)
- 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 E or Esc)
The book is thrown out because there is no space in your inventory
- Inspect the item entity data
It has no thrower even though you threw it (passively)