summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-09-29 15:36:02 -0400
committerTahg <tahgtahv@gmail.com>2011-09-29 15:36:52 -0400
commitb73d095a9f189d95f45ce73dd24678a61373d92a (patch)
treeadcd7152799ca41b829deb5d2d30acaa51aa6583 /src/main/java/net
parent935313dea7bd379e59f83c70c0c8e822324f592a (diff)
downloadcraftbukkit-b73d095a9f189d95f45ce73dd24678a61373d92a.tar
craftbukkit-b73d095a9f189d95f45ce73dd24678a61373d92a.tar.gz
craftbukkit-b73d095a9f189d95f45ce73dd24678a61373d92a.tar.lz
craftbukkit-b73d095a9f189d95f45ce73dd24678a61373d92a.tar.xz
craftbukkit-b73d095a9f189d95f45ce73dd24678a61373d92a.zip
revert change to make mobspawners drop a spawner of that type
removed some debug code fixed a 1.5 compatibility issue
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/BlockMobSpawner.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityTypes.java4
-rw-r--r--src/main/java/net/minecraft/server/TileEntityMobSpawner.java7
3 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/BlockMobSpawner.java b/src/main/java/net/minecraft/server/BlockMobSpawner.java
index 752fd228..7be3e865 100644
--- a/src/main/java/net/minecraft/server/BlockMobSpawner.java
+++ b/src/main/java/net/minecraft/server/BlockMobSpawner.java
@@ -17,7 +17,7 @@ public class BlockMobSpawner extends BlockContainer {
}
public int a(Random random) {
- return 1; // CraftBukkit
+ return 0; // CraftBukkit
}
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 057d30de..61136bc7 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -29,7 +29,7 @@ public class EntityTypes {
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
}
} catch (Exception exception) {
- exception.printStackTrace();
+ // CraftBukkit - don't do anything here
}
return entity;
@@ -45,7 +45,7 @@ public class EntityTypes {
entity = (Entity) oclass.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
}
} catch (Exception exception) {
- exception.printStackTrace();
+ // CraftBukkit - don't do anything here
}
if (entity != null) {
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";
}
}