@@ -19,7 +19,7 @@
|
||||
public abstract class EntityInsentient extends EntityLiving {
|
||||
|
||||
private static final DataWatcherObject<Byte> a = DataWatcher.a(EntityInsentient.class, DataWatcherRegistry.a);
|
||||
@@ -27,11 +39,11 @@
|
||||
@@ -27,7 +39,7 @@
|
||||
public float[] dropChanceHand;
|
||||
private final NonNullList<ItemStack> bE;
|
||||
public float[] dropChanceArmor;
|
||||
@@ -27,13 +27,7 @@
|
||||
+ // public boolean canPickUpLoot; // CraftBukkit - moved up to EntityLiving
|
||||
public boolean persistent;
|
||||
private final Map<PathType, Float> bH;
|
||||
- private MinecraftKey bI;
|
||||
- private long bJ;
|
||||
+ public MinecraftKey bI; // CraftBukkit private -> public
|
||||
+ public long bJ; // CraftBukkit private -> public
|
||||
private boolean bK;
|
||||
private Entity leashHolder;
|
||||
private NBTTagCompound bM;
|
||||
public MinecraftKey lootTableKey;
|
||||
@@ -57,6 +69,9 @@
|
||||
this.n();
|
||||
}
|
||||
@@ -107,17 +101,17 @@
|
||||
int i;
|
||||
|
||||
@@ -394,6 +449,11 @@
|
||||
protected MinecraftKey G() {
|
||||
protected MinecraftKey getDefaultLootTable() {
|
||||
return null;
|
||||
}
|
||||
+ // CraftBukkit - start
|
||||
+ public MinecraftKey getLootTable() {
|
||||
+ return G();
|
||||
+ return getDefaultLootTable();
|
||||
+ }
|
||||
+ // CraftBukkit - end
|
||||
|
||||
protected void a(boolean flag, int i, DamageSource damagesource) {
|
||||
MinecraftKey minecraftkey = this.bI;
|
||||
MinecraftKey minecraftkey = this.lootTableKey;
|
||||
@@ -470,11 +530,21 @@
|
||||
ItemStack itemstack1 = this.getEquipment(enumitemslot);
|
||||
boolean flag = this.a(itemstack, itemstack1, enumitemslot);
|
||||
@@ -132,7 +126,7 @@
|
||||
+ canPickup = !entityEvent.isCancelled();
|
||||
+ if (canPickup) {
|
||||
+ // CraftBukkit end
|
||||
double d0 = this.c(enumitemslot);
|
||||
double d0 = (double) this.c(enumitemslot);
|
||||
|
||||
if (!itemstack1.isEmpty() && (double) (this.random.nextFloat() - 0.1F) < d0) {
|
||||
+ this.forceDrops = true; // CraftBukkit
|
||||
@@ -155,7 +149,7 @@
|
||||
this.die();
|
||||
} else if (d3 < 1024.0D) {
|
||||
this.ticksFarFromPlayer = 0;
|
||||
@@ -946,12 +1016,24 @@
|
||||
@@ -942,12 +1012,24 @@
|
||||
|
||||
public final boolean b(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
if (this.isLeashed() && this.getLeashHolder() == entityhuman) {
|
||||
@@ -180,7 +174,7 @@
|
||||
this.setLeashHolder(entityhuman, true);
|
||||
itemstack.subtract(1);
|
||||
return true;
|
||||
@@ -972,10 +1054,12 @@
|
||||
@@ -968,10 +1050,12 @@
|
||||
|
||||
if (this.bK) {
|
||||
if (!this.isAlive()) {
|
||||
@@ -193,7 +187,7 @@
|
||||
this.unleash(true, true);
|
||||
}
|
||||
}
|
||||
@@ -986,7 +1070,9 @@
|
||||
@@ -982,7 +1066,9 @@
|
||||
this.bK = false;
|
||||
this.leashHolder = null;
|
||||
if (!this.world.isClientSide && flag1) {
|
||||
@@ -203,7 +197,7 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide && flag && this.world instanceof WorldServer) {
|
||||
@@ -1056,6 +1142,7 @@
|
||||
@@ -1052,6 +1138,7 @@
|
||||
|
||||
this.setLeashHolder(entityleash, true);
|
||||
} else {
|
||||
@@ -211,7 +205,7 @@
|
||||
this.unleash(false, true);
|
||||
}
|
||||
}
|
||||
@@ -1151,7 +1238,14 @@
|
||||
@@ -1147,7 +1234,14 @@
|
||||
int j = EnchantmentManager.getFireAspectEnchantmentLevel(this);
|
||||
|
||||
if (j > 0) {
|
||||
|
||||
Reference in New Issue
Block a user