SPIGOT-2792: Return PIG for broken spawners

This commit is contained in:
md_5 2016-11-18 15:32:27 +11:00
parent 8095a750e7
commit 88eede85cc

View File

@ -24,7 +24,8 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
}
public EntityType getSpawnedType() {
return EntityType.fromName(spawner.getSpawner().getMobName().a());
MinecraftKey key = spawner.getSpawner().getMobName();
return (key == null) ? EntityType.PIG : EntityType.fromName(key.a());
}
public void setSpawnedType(EntityType entityType) {