ActuallyAdditions directly spawns in EntityItems during LivingDropsEvent
Aaron1011 opened this issue ยท 3 comments
Currently, ActuallyAdditions directly calls Entity#entityDropItem
in several LivingDropsEvent handlers. This is breaking mods such as SpongeForge which rely on EntityItems being added to the LivingDropsEvent#getDrops
list by other event listeners.
If you could change the listeners I linked to add EntityItem
s to the event drops list, rather than immediately spawning them in, I'd be very appreciative.
I talked to a lot of modders about this and most of them said that both ways are fine.
Also, I don't support SpongeForge normally.
Is this really necessary?
While both ways will produce the desired result with plain Forge (the entity will be spawned into the world), avoiding using the event is generally discouraged.
Though most mods don't rely on events as extensively as SpongeForge does, directly spawning in entities during LivingDropsEvent
will prevent them from learning about them. For example, a mod which tries to prevent entities from dropping items on death (due to the mob being 'cursed' or otherwise affected by the mod, for example) will be unable to do so with the drops that your mod adds. It's just generally good practice to use the event as intended, as it allow maximum compatibility with other mods.
EDIT: I accidentally submitted my comment before I was done typing.