@@ -28,15 +28,6 @@
|
||||
public abstract class EntityLiving extends Entity {
|
||||
|
||||
private static final UUID b = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
||||
@@ -30,7 +51,7 @@
|
||||
public static final DataWatcherObject<Float> HEALTH = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.c);
|
||||
private static final DataWatcherObject<Integer> f = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Boolean> g = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.i);
|
||||
- private static final DataWatcherObject<Integer> bh = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.b);
|
||||
+ public static final DataWatcherObject<Integer> bh = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.b); // PAIL private -> public, rename ARROWS_IN_BODY
|
||||
private static final DataWatcherObject<Integer> bi = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Optional<BlockPosition>> bj = DataWatcher.a(EntityLiving.class, DataWatcherRegistry.m);
|
||||
protected static final EntitySize ah = EntitySize.c(0.2F, 0.2F);
|
||||
@@ -106,6 +127,21 @@
|
||||
private float bB;
|
||||
private float bC;
|
||||
@@ -752,7 +743,7 @@
|
||||
}
|
||||
|
||||
public final void setArrowCount(int i) {
|
||||
- this.datawatcher.set(EntityLiving.bh, i);
|
||||
- this.datawatcher.set(EntityLiving.ARROWS_IN_BODY, i);
|
||||
+ // CraftBukkit start
|
||||
+ setArrowCount(i, false);
|
||||
}
|
||||
@@ -762,14 +753,14 @@
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ this.datawatcher.set(EntityLiving.bh, event.getNewAmount());
|
||||
+ this.datawatcher.set(EntityLiving.ARROWS_IN_BODY, event.getNewAmount());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public final int dy() {
|
||||
return (Integer) this.datawatcher.get(EntityLiving.bi);
|
||||
}
|
||||
@@ -1815,6 +2222,7 @@
|
||||
@@ -1816,6 +2223,7 @@
|
||||
}
|
||||
|
||||
if (this.onGround && !this.world.isClientSide) {
|
||||
@@ -777,7 +768,7 @@
|
||||
this.setFlag(7, false);
|
||||
}
|
||||
} else {
|
||||
@@ -2320,6 +2728,7 @@
|
||||
@@ -2321,6 +2729,7 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -785,7 +776,7 @@
|
||||
this.setFlag(7, flag);
|
||||
}
|
||||
|
||||
@@ -2440,6 +2849,7 @@
|
||||
@@ -2441,6 +2850,7 @@
|
||||
}
|
||||
|
||||
public boolean hasLineOfSight(Entity entity) {
|
||||
@@ -793,7 +784,7 @@
|
||||
Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ());
|
||||
|
||||
@@ -2457,14 +2867,21 @@
|
||||
@@ -2458,14 +2868,21 @@
|
||||
|
||||
@Override
|
||||
public boolean isInteractable() {
|
||||
@@ -817,7 +808,7 @@
|
||||
@Override
|
||||
protected void velocityChanged() {
|
||||
this.velocityChanged = this.random.nextDouble() >= this.b(GenericAttributes.KNOCKBACK_RESISTANCE);
|
||||
@@ -2657,7 +3074,25 @@
|
||||
@@ -2658,7 +3075,25 @@
|
||||
} else {
|
||||
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
||||
this.b(this.activeItem, 16);
|
||||
@@ -844,7 +835,7 @@
|
||||
|
||||
if (itemstack != this.activeItem) {
|
||||
this.a(enumhand, itemstack);
|
||||
@@ -2749,10 +3184,18 @@
|
||||
@@ -2750,10 +3185,18 @@
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@@ -866,7 +857,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2849,7 +3292,7 @@
|
||||
@@ -2850,7 +3293,7 @@
|
||||
}
|
||||
|
||||
public void entityWakeup() {
|
||||
@@ -875,7 +866,7 @@
|
||||
World world = this.world;
|
||||
|
||||
this.world.getClass();
|
||||
@@ -2920,7 +3363,7 @@
|
||||
@@ -2921,7 +3364,7 @@
|
||||
Pair<MobEffect, Float> pair = (Pair) iterator.next();
|
||||
|
||||
if (!world.isClientSide && pair.getFirst() != null && world.random.nextFloat() < (Float) pair.getSecond()) {
|
||||
|
||||
Reference in New Issue
Block a user