Fix spawner changer not working with some mobs

Closes #517
This commit is contained in:
Ellpeck 2016-12-23 15:33:45 +01:00
parent 30f10d5b91
commit a6f3581d24

View file

@ -118,7 +118,9 @@ public class ItemSpawnerChanger extends ItemBase{
} }
if(!(entity instanceof EntityPlayer) && entity.isNonBoss()){ if(!(entity instanceof EntityPlayer) && entity.isNonBoss()){
String entityName = EntityList.getEntityString(entity); ResourceLocation entityLoc = EntityList.getKey(entity.getClass());
if(entityLoc != null){
String entityName = entityLoc.toString();
if(entityName != null && !entityName.isEmpty()){ if(entityName != null && !entityName.isEmpty()){
for(String name : ConfigStringListValues.SPAWNER_CHANGER_BLACKLIST.getValue()){ for(String name : ConfigStringListValues.SPAWNER_CHANGER_BLACKLIST.getValue()){
if(entityName.equals(name)){ if(entityName.equals(name)){
@ -130,6 +132,7 @@ public class ItemSpawnerChanger extends ItemBase{
return true; return true;
} }
} }
}
return false; return false;
} }