Actually Additions

Actually Additions

66M Downloads

ActuallyAdditions directly spawns in EntityItems during LivingDropsEvent

Aaron1011 opened this issue ยท 3 comments

commented

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 EntityItems to the event drops list, rather than immediately spawning them in, I'd be very appreciative.

commented

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?

commented

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.

commented

Ugh. I will update this, but not for 1.10 because it's not a major important bug. So sorry.
Plus, my opinion still is that this is also partly a Sponge issue that should be fixed, because it alters the Vanilla/Forge behavior.