diff options
author | FearThe1337 <admin@fearthe1337.com> | 2014-12-09 15:40:38 +0100 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-10 18:35:55 +0000 |
commit | e24569a9ed3e65942c0de667d2f4b66fc9dcec82 (patch) | |
tree | 88e0baeb4dbd5980ff5921ff680af1883f9f5bb5 /nms-patches/EntityOcelot.patch | |
parent | 0af8ea10d80db5e6ed1e49fdb432a820ac4681e6 (diff) | |
download | craftbukkit-e24569a9ed3e65942c0de667d2f4b66fc9dcec82.tar craftbukkit-e24569a9ed3e65942c0de667d2f4b66fc9dcec82.tar.gz craftbukkit-e24569a9ed3e65942c0de667d2f4b66fc9dcec82.tar.lz craftbukkit-e24569a9ed3e65942c0de667d2f4b66fc9dcec82.tar.xz craftbukkit-e24569a9ed3e65942c0de667d2f4b66fc9dcec82.zip |
SPIGOT-143: Fix various animal stuff not being canceled by damageEntity.
Fixes wolves and ocelots standing up when the damag event is being canceled.
Also stops breeding mode reset by the same event.
Diffstat (limited to 'nms-patches/EntityOcelot.patch')
-rw-r--r-- | nms-patches/EntityOcelot.patch | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/nms-patches/EntityOcelot.patch b/nms-patches/EntityOcelot.patch index 85153b7d..0ec9bbaa 100644 --- a/nms-patches/EntityOcelot.patch +++ b/nms-patches/EntityOcelot.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityOcelot.java 2014-11-28 17:43:43.141707434 +0000 -+++ src/main/java/net/minecraft/server/EntityOcelot.java 2014-11-28 17:38:21.000000000 +0000 +--- ../work/decompile-8eb82bde/net/minecraft/server/EntityOcelot.java 2014-12-10 18:34:37.228492560 +0000 ++++ src/main/java/net/minecraft/server/EntityOcelot.java 2014-12-10 18:33:29.824493292 +0000 @@ -51,7 +51,7 @@ } @@ -9,7 +9,30 @@ } protected void aW() { -@@ -124,7 +124,8 @@ +@@ -95,15 +95,20 @@ + public boolean r(Entity entity) { + return entity.damageEntity(DamageSource.mobAttack(this), 3.0F); + } +- ++ ++ /* CraftBukkit start ++ // Function disabled as it has no special function anymore after ++ // setSitting is disabled. + public boolean damageEntity(DamageSource damagesource, float f) { + if (this.isInvulnerable(damagesource)) { + return false; + } else { +- this.bk.setSitting(false); ++ // CraftBukkit - moved into EntityLiving.d(DamageSource, float) ++ // this.bk.setSitting(false); + return super.damageEntity(damagesource, f); + } + } ++ // CraftBukkit end */ + + protected void dropDeathLoot(boolean flag, int i) {} + +@@ -124,7 +129,8 @@ } if (!this.world.isStatic) { @@ -19,7 +42,7 @@ this.setTamed(true); this.setCatType(1 + this.world.random.nextInt(3)); this.setOwnerUUID(entityhuman.getUniqueID().toString()); -@@ -231,7 +232,7 @@ +@@ -231,7 +237,7 @@ entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F); entityocelot.setAgeRaw(-24000); |