Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Reassembly opened this issue Oct 1, 2015 · 0 comments
Closed

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

Reassembly opened this issue Oct 1, 2015 · 0 comments
Labels

Comments

@Reassembly
Copy link

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

@Vazkii Vazkii added bug A bug minor labels Oct 1, 2015
@Vazkii Vazkii closed this as completed Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants