summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityInsentient.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-09 11:43:49 +1000
committermd_5 <git@md-5.net>2016-06-09 11:43:49 +1000
commita8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d (patch)
tree9efb0ce242b802a188032bd500ef7afaf29032a3 /nms-patches/EntityInsentient.patch
parent0cd0397a8295992112ad3bf0d37795a04d22503e (diff)
downloadcraftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.gz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.lz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.xz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.zip
Update to Minecraft 1.10
Diffstat (limited to 'nms-patches/EntityInsentient.patch')
-rw-r--r--nms-patches/EntityInsentient.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch
index 832a598c..5cbb4fe4 100644
--- a/nms-patches/EntityInsentient.patch
+++ b/nms-patches/EntityInsentient.patch
@@ -16,7 +16,7 @@
public abstract class EntityInsentient extends EntityLiving {
private static final DataWatcherObject<Byte> a = DataWatcher.a(EntityInsentient.class, DataWatcherRegistry.a);
-@@ -61,6 +70,9 @@
+@@ -52,6 +61,9 @@
this.r();
}
@@ -26,20 +26,20 @@
}
protected void r() {}
-@@ -75,9 +87,10 @@
+@@ -66,9 +78,10 @@
}
public float a(PathType pathtype) {
-- Float float = (Float) this.bA.get(pathtype);
+- Float float = (Float) this.bB.get(pathtype);
+ // CraftBukkit - decompile error
-+ Float ofloat = (Float) this.bA.get(pathtype);
++ Float ofloat = (Float) this.bB.get(pathtype);
- return float == null ? pathtype.a() : float.floatValue();
+ return ofloat == null ? pathtype.a() : ofloat.floatValue();
}
public void a(PathType pathtype, float f) {
-@@ -114,7 +127,38 @@
+@@ -105,7 +118,38 @@
}
public void setGoalTarget(@Nullable EntityLiving entityliving) {
@@ -78,14 +78,14 @@
}
public boolean d(Class<? extends EntityLiving> oclass) {
-@@ -327,11 +371,20 @@
+@@ -350,11 +394,20 @@
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
+
+ // CraftBukkit start - If looting or persistence is false only use it if it was set after we started using it
if (nbttagcompound.hasKeyOfType("CanPickUpLoot", 1)) {
-- this.l(nbttagcompound.getBoolean("CanPickUpLoot"));
+- this.m(nbttagcompound.getBoolean("CanPickUpLoot"));
+ boolean data = nbttagcompound.getBoolean("CanPickUpLoot");
+ if (isLevelAtLeast(nbttagcompound, 1) || data) {
+ this.l(data);
@@ -101,7 +101,7 @@
NBTTagList nbttaglist;
int i;
-@@ -556,11 +609,11 @@
+@@ -579,11 +632,11 @@
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@@ -115,7 +115,7 @@
this.die();
} else if (d3 < 1024.0D) {
this.ticksFarFromPlayer = 0;
-@@ -940,9 +993,21 @@
+@@ -965,9 +1018,21 @@
public final boolean a(EntityHuman entityhuman, @Nullable ItemStack itemstack, EnumHand enumhand) {
if (this.isLeashed() && this.getLeashHolder() == entityhuman) {
@@ -137,9 +137,9 @@
this.setLeashHolder(entityhuman, true);
--itemstack.count;
return true;
-@@ -962,10 +1027,12 @@
+@@ -987,10 +1052,12 @@
- if (this.bD) {
+ if (this.bE) {
if (!this.isAlive()) {
+ this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.PLAYER_UNLEASH)); // CraftBukkit
this.unleash(true, true);
@@ -150,8 +150,8 @@
this.unleash(true, true);
}
}
-@@ -976,7 +1043,9 @@
- this.bD = false;
+@@ -1001,7 +1068,9 @@
+ this.bE = false;
this.leashHolder = null;
if (!this.world.isClientSide && flag1) {
+ this.forceDrops = true; // CraftBukkit
@@ -160,7 +160,7 @@
}
if (!this.world.isClientSide && flag && this.world instanceof WorldServer) {
-@@ -1046,6 +1115,7 @@
+@@ -1071,6 +1140,7 @@
this.leashHolder = entityleash;
} else {