buttilda / Headcrumbs

Headcrumbs
aww yiss
14 stars 21 forks source link

Special Mobs Compatibility Problem #54

Closed BlayTheNinth closed 8 years ago

BlayTheNinth commented 9 years ago

SpecialMobs has an option to completely disable Vanilla zombie spawning (allow_vanilla), so that it will instead spawn it's EntitySpecialZombie that extends EntityZombie.

In your spawn condition code, you're checking if entityClass == EntityZombie.class, which will be false in the case of EntitySpecialZombie.

https://github.com/ganymedes01/Headcrumbs/blob/master/src/main/java/ganymedes01/headcrumbs/Headcrumbs.java#L311

You should instead check EntityZombie.class.isAssignableFrom(entityClass) to fix Headcrumbs mobs not spawning at all if Special Mobs' allow_vanilla option is set to false.

buttilda commented 9 years ago

But then what if another mod adds an entity that extends the EntityZombie?

BlayTheNinth commented 9 years ago

I don't see the problem - if it does extend EntityZombie it's probably gonna be humanoid enough for Headcrumbs mobs to spawn as well.

buttilda commented 9 years ago

Not necessarily, zombie pigmen for example extend EntityZombie and I definitely don't want humans spawning like them. Who knows what another mod might do

BlayTheNinth commented 9 years ago

Well, I guess then the only way to fix it is 1) make the entity condition configurable or 2) hardcode support for SpecialMobs.

buttilda commented 8 years ago

Hardcoded support for SpecialMobs :3

Only just saw your reply, the email notification probably got lost amongst the other dozens of emails I get a day. Sorry about that, I didn't mean to ignore the issue.