diff --git a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java index 3af8e8427a..2f36945655 100644 --- a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java +++ b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java @@ -28,7 +28,13 @@ public class TileEntityMobSpawner extends TileEntity { public void setId(int id) { mobName = EntityTypes.getNameFromClass(EntityTypes.getClassFromId(id)); - System.out.println("Setting mob type to: " + mobName); + if(mobName == null || mobName.isEmpty()) mobName = "Pig"; + try { + EntityTypes.a(mobName, world); + } + catch (Throwable t) { // If we get any error at all, fallback to a Pig + mobName = "Pig"; + } } // CraftBukkit end