mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
@@ -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 {
|
||||
|
Reference in New Issue
Block a user