MinecraftForge/MinecraftForge — pull request #1274 by Scribblon (2014-07-31 21:56:17+00:00)
Title: Added ItemHurtEvent, ItemDeathEvent (ItemEntity)

-Added ItemDeathEvent
-Added ItemHurtEvent
-Modified Forgehooks to conform EVENT_BUS.post(Event) conventions:
--added onItemHurt(ItemEntity, DamageSource, float)
--added onItemDeath(ItemEntity, DamageSource)
-Modified attackEntityFrom(DamageSource, float) EnityItem to post
Events.

Reasoning of being added: Every entity can be hurt and die. This is not excluded to dropped items (EntityItems). This makes it possible for mods to allow crafting through interaction with the world with vanilla items. Currently (one of the many/) a workaround with a custom EntityItem is needed to detect if such EntityItem has died.

Example of workaround here:
The Custom EntityItem:
https://github.com/Scribblon/RiftCraft/blob/master/src/main/java/nl/scribblon/riftcraft/entity/RCEntityItem.java
The Custom EventsHandler:
https://github.com/Scribblon/RiftCraft/blob/master/src/main/java/nl/scribblon/riftcraft/handler/EnderPearlHandler.java

This workaround makes me concerned of future compatibility issues when multiple listeners start spawning their own EntityItem subclasses for the same item. Not to talk about the current issue with the "Fetching addPacket for removed entity"-spam I am trying to resolve.