MinecraftForge/MinecraftForge — pull request #1302 by Scribblon (2014-08-06 22:31:51+00:00)
Title: Added ItemHurtEvent, ItemDeathEvent (ItemEntity)

Clean commit, re-based locally to its own branch, still based on commit bc8374d71c6b3131d5a138953a5baf1a0eb282d8 . Merge is still clear according to github.

Original PR: https://github.com/MinecraftForge/MinecraftForge/pull/1274

Original Text:
>-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.
>//snip

Added remark: Whenever multiple mods are going to introduce their own Custom EntityItems to fetch events like these, problems will arise when these mods are mixed together.