summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityLiving.patch
diff options
context:
space:
mode:
authorFearThe1337 <admin@fearthe1337.com>2014-12-09 15:40:38 +0100
committerThinkofdeath <thinkofdeath@spigotmc.org>2014-12-10 18:35:55 +0000
commite24569a9ed3e65942c0de667d2f4b66fc9dcec82 (patch)
tree88e0baeb4dbd5980ff5921ff680af1883f9f5bb5 /nms-patches/EntityLiving.patch
parent0af8ea10d80db5e6ed1e49fdb432a820ac4681e6 (diff)
downloadcraftbukkit-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/EntityLiving.patch')
-rw-r--r--nms-patches/EntityLiving.patch32
1 files changed, 22 insertions, 10 deletions
diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch
index e28fdd6e..f6652912 100644
--- a/nms-patches/EntityLiving.patch
+++ b/nms-patches/EntityLiving.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/EntityLiving.java 2014-11-28 17:43:43.129707434 +0000
-+++ src/main/java/net/minecraft/server/EntityLiving.java 2014-11-28 17:38:22.000000000 +0000
+--- ../work/decompile-8eb82bde/net/minecraft/server/EntityLiving.java 2014-12-10 18:34:37.200492561 +0000
++++ src/main/java/net/minecraft/server/EntityLiving.java 2014-12-10 18:32:58.472493632 +0000
@@ -8,6 +8,15 @@
import java.util.Random;
import java.util.UUID;
@@ -208,7 +208,7 @@
this.getEquipment(4).damage((int) (f * 4.0F + this.random.nextFloat() * f * 2.0F), this);
f *= 0.75F;
}
-@@ -602,13 +683,22 @@
+@@ -602,16 +683,34 @@
return false;
}
@@ -233,7 +233,19 @@
this.hurtTicks = this.at = 10;
}
-@@ -717,11 +807,19 @@
++ // CraftBukkit start
++ if(this instanceof EntityAnimal){
++ ((EntityAnimal)this).cq();
++ if(this instanceof EntityTameableAnimal){
++ ((EntityTameableAnimal)this).getGoalSit().setSitting(false);
++ }
++ }
++ // CraftBukkit end
++
+ this.au = 0.0F;
+ Entity entity = damagesource.getEntity();
+
+@@ -717,11 +816,19 @@
}
if (this.aZ() && this.world.getGameRules().getBoolean("doMobLoot")) {
@@ -254,7 +266,7 @@
}
}
-@@ -781,8 +879,13 @@
+@@ -781,8 +888,13 @@
int i = MathHelper.f((f - 3.0F - f2) * f1);
if (i > 0) {
@@ -269,7 +281,7 @@
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
int l = MathHelper.floor(this.locZ);
-@@ -826,7 +929,7 @@
+@@ -826,7 +938,7 @@
int i = 25 - this.bq();
float f1 = f * (float) i;
@@ -278,7 +290,7 @@
f = f1 / 25.0F;
}
-@@ -840,8 +943,9 @@
+@@ -840,8 +952,9 @@
int i;
int j;
float f1;
@@ -290,7 +302,7 @@
i = (this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
j = 25 - i;
f1 = f * (float) j;
-@@ -867,22 +971,117 @@
+@@ -867,22 +980,117 @@
}
}
@@ -414,7 +426,7 @@
}
public CombatTracker br() {
-@@ -1236,7 +1435,8 @@
+@@ -1236,7 +1444,8 @@
if (f > 0.0025000002F) {
f3 = 1.0F;
f2 = (float) Math.sqrt((double) f) * 3.0F;
@@ -424,7 +436,7 @@
}
if (this.ax > 0.0F) {
-@@ -1400,6 +1600,13 @@
+@@ -1400,6 +1609,13 @@
if (list != null && !list.isEmpty()) {
for (int i = 0; i < list.size(); ++i) {
Entity entity = (Entity) list.get(i);