Closed BlayTheNinth closed 8 years ago
But then what if another mod adds an entity that extends the EntityZombie?
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.
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
Well, I guess then the only way to fix it is 1) make the entity condition configurable or 2) hardcode support for SpecialMobs.
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.
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.