diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityMobSpawner.java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityMobSpawner.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java index 2f369456..8c3589ff 100644 --- a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java +++ b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java @@ -28,11 +28,10 @@ public class TileEntityMobSpawner extends TileEntity { public void setId(int id) { mobName = EntityTypes.getNameFromClass(EntityTypes.getClassFromId(id)); - if(mobName == null || mobName.isEmpty()) mobName = "Pig"; - try { - EntityTypes.a(mobName, world); + if (mobName == null || mobName.length() == 0) { + mobName = "Pig"; } - catch (Throwable t) { // If we get any error at all, fallback to a Pig + if (EntityTypes.a(mobName, world) == null) { mobName = "Pig"; } } |