diff options
author | EvilSeph <evilseph@gmail.com> | 2013-07-02 23:23:19 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-07-02 23:38:44 -0400 |
commit | 29fa46a4b2c43f555528bf24d99ecf0225c6c75f (patch) | |
tree | 7c657b0a15190128f25161c2addf0225b5ec3102 | |
parent | 7b71fc23be2c3c51a7e560b9a6c9f9ab9cd0fc64 (diff) | |
download | craftbukkit-29fa46a4b2c43f555528bf24d99ecf0225c6c75f.tar craftbukkit-29fa46a4b2c43f555528bf24d99ecf0225c6c75f.tar.gz craftbukkit-29fa46a4b2c43f555528bf24d99ecf0225c6c75f.tar.lz craftbukkit-29fa46a4b2c43f555528bf24d99ecf0225c6c75f.tar.xz craftbukkit-29fa46a4b2c43f555528bf24d99ecf0225c6c75f.zip |
Fix donkey/mule dupe exploit.
-rw-r--r-- | src/main/java/net/minecraft/server/ContainerHorse.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHorse.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java index 2c2ae9a9..4ddf8e05 100644 --- a/src/main/java/net/minecraft/server/ContainerHorse.java +++ b/src/main/java/net/minecraft/server/ContainerHorse.java @@ -60,7 +60,7 @@ public class ContainerHorse extends Container { } public boolean a(EntityHuman entityhuman) { - return this.a.a(entityhuman) && this.f.d(entityhuman) < 8.0F; + return this.a.a(entityhuman) && this.f.isAlive() && this.f.d(entityhuman) < 8.0F; // CraftBukkit - add isAlive as a validator } public ItemStack b(EntityHuman entityhuman, int i) { diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java index 93c9f4c7..11bb4ba0 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -791,11 +791,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return this.passenger == null && this.vehicle == null && this.bS() && this.bR() && !this.cv() && this.getHealth() >= this.getMaxHealth(); } + /* CraftBukkit start - don't treat horses differently public void die() { if (this.world.isStatic || !this.bS() && !this.ce() || this.getHealth() <= 0.0F) { super.die(); } } + // CraftBukkit end */ public void e(boolean flag) { this.b(32, flag); |