Botania

Botania

133M Downloads

Elementium axe drops normal-zombie heads from pig-zombies.

Reassembly opened this issue ยท 0 comments

commented

TL;DR: Title says it all.

I discovered this while investigating why ForbiddenMagic's Axe of the Skulltaker wasn't dropping any heads at all. Turns out, FM was using "event.entityLiving.getClass() == Entity[XXXX].class" to check for mob types, which broke compatibility with SpecialMobs (and possibly other mob-altering mods).

I suggested that SpitefulFox use "instanceof" instead, like Botania does with its elementium axe, so that it would work with mods which replace vanilla mobs with variant subclasses. He replied that he used "==" deliberately, to prevent inappropriate head types from dropping from mobs, e.g. zombie heads from pigmen (...which is the ONLY vanilla mob with both a vanilla subclass and a vanilla head, so that e.g. is actually an i.e...).

...and when tested, the elementium axe does indeed drop normal-zombie heads from pigmen, just as SpitefulFox was trying to avoid in FM. (Along with wither heads from wither skeletons with SpecialMobs installed, which is what I really wanted in the first place, so I'm okay with it.)

I believe that using "(event.entityLiving instanceof EntityZombie) && !(event.entityLiving instanceof EntityPigZombie)", to handle that one edge-case without breaking compatibility with other enhanced mob subclasses, would handle this edge case for Botania as well.

Referenced parallel bug: SpitefulFox/ForbiddenMagic#86