mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 19:25:49 -07:00
Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1.
This commit is contained in:
@@ -131,23 +131,23 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.jumpController;
|
||||
}
|
||||
|
||||
public Navigation ak() {
|
||||
public Navigation al() {
|
||||
return this.navigation;
|
||||
}
|
||||
|
||||
public EntitySenses al() {
|
||||
public EntitySenses am() {
|
||||
return this.m;
|
||||
}
|
||||
|
||||
public Random am() {
|
||||
public Random an() {
|
||||
return this.random;
|
||||
}
|
||||
|
||||
public EntityLiving an() {
|
||||
public EntityLiving ao() {
|
||||
return this.lastDamager;
|
||||
}
|
||||
|
||||
public EntityLiving ao() {
|
||||
public EntityLiving ap() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
@@ -157,15 +157,15 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public int ap() {
|
||||
public int aq() {
|
||||
return this.aV;
|
||||
}
|
||||
|
||||
public float aq() {
|
||||
public float ar() {
|
||||
return this.X;
|
||||
}
|
||||
|
||||
public float ar() {
|
||||
public float as() {
|
||||
return this.n;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public EntityLiving as() {
|
||||
public EntityLiving at() {
|
||||
return this.l;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public void z() {}
|
||||
|
||||
public boolean at() {
|
||||
public boolean au() {
|
||||
return this.e(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
|
||||
}
|
||||
|
||||
@@ -206,19 +206,19 @@ public abstract class EntityLiving extends Entity {
|
||||
this.p = (float) l;
|
||||
}
|
||||
|
||||
public ChunkCoordinates au() {
|
||||
public ChunkCoordinates av() {
|
||||
return this.o;
|
||||
}
|
||||
|
||||
public float av() {
|
||||
public float aw() {
|
||||
return this.p;
|
||||
}
|
||||
|
||||
public void aw() {
|
||||
public void ax() {
|
||||
this.p = -1.0F;
|
||||
}
|
||||
|
||||
public boolean ax() {
|
||||
public boolean ay() {
|
||||
return this.p != -1.0F;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return 80;
|
||||
}
|
||||
|
||||
public void ay() {
|
||||
public void az() {
|
||||
String s = this.i();
|
||||
|
||||
if (s != null) {
|
||||
@@ -259,13 +259,13 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void az() {
|
||||
public void aA() {
|
||||
this.an = this.ao;
|
||||
super.az();
|
||||
super.aA();
|
||||
// MethodProfiler.a("mobBaseTick"); // CraftBukkit - not in production code
|
||||
if (this.random.nextInt(1000) < this.a++) {
|
||||
if (this.isAlive() && this.random.nextInt(1000) < this.a++) {
|
||||
this.a = -this.m();
|
||||
this.ay();
|
||||
this.az();
|
||||
}
|
||||
|
||||
// CraftBukkit start - don't inline the damage, perform it with an event
|
||||
@@ -329,7 +329,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
if (this.health <= 0) {
|
||||
this.aA();
|
||||
this.aB();
|
||||
}
|
||||
|
||||
if (this.lastDamageByPlayerTime > 0) {
|
||||
@@ -352,7 +352,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
this.aJ();
|
||||
this.aK();
|
||||
this.ac = this.ab;
|
||||
this.W = this.V;
|
||||
this.Y = this.X;
|
||||
@@ -373,7 +373,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
protected void aA() {
|
||||
protected void aB() {
|
||||
++this.deathTicks;
|
||||
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead).
|
||||
int i;
|
||||
@@ -388,7 +388,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
this.aG();
|
||||
this.aH();
|
||||
this.die();
|
||||
|
||||
for (i = 0; i < 20; ++i) {
|
||||
@@ -413,7 +413,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void aB() {
|
||||
public void aC() {
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
double d0 = this.random.nextGaussian() * 0.02D;
|
||||
double d1 = this.random.nextGaussian() * 0.02D;
|
||||
@@ -424,15 +424,15 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void Q() {
|
||||
super.Q();
|
||||
public void R() {
|
||||
super.R();
|
||||
this.Z = this.aa;
|
||||
this.aa = 0.0F;
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
public void G_() {
|
||||
super.G_();
|
||||
public void F_() {
|
||||
super.F_();
|
||||
if (this.aI > 0) {
|
||||
if (this.aJ <= 0) {
|
||||
this.aJ = 60;
|
||||
@@ -652,7 +652,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (flag) {
|
||||
this.world.broadcastEntityEffect(this, (byte) 2);
|
||||
this.aV();
|
||||
this.aW();
|
||||
if (entity != null) {
|
||||
double d0 = entity.locX - this.locX;
|
||||
|
||||
@@ -688,7 +688,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
|
||||
public int S() {
|
||||
public int T() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
protected int d(DamageSource damagesource, int i) {
|
||||
if (!damagesource.ignoresArmor()) {
|
||||
int j = 25 - this.S();
|
||||
int j = 25 - this.T();
|
||||
int k = i * j + this.ar;
|
||||
|
||||
this.f(i);
|
||||
@@ -864,7 +864,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public void a(float f, float f1) {
|
||||
double d0;
|
||||
|
||||
if (this.aT()) {
|
||||
if (this.aU()) {
|
||||
d0 = this.locY;
|
||||
this.a(f, f1, this.c_() ? 0.04F : 0.02F);
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
@@ -875,7 +875,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.positionChanged && this.d(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
|
||||
this.motY = 0.30000001192092896D;
|
||||
}
|
||||
} else if (this.aU()) {
|
||||
} else if (this.aV()) {
|
||||
d0 = this.locY;
|
||||
this.a(f, f1, 0.02F);
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
@@ -903,7 +903,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (this.onGround) {
|
||||
if (this.c_()) {
|
||||
f4 = this.ar();
|
||||
f4 = this.as();
|
||||
} else {
|
||||
f4 = this.al;
|
||||
}
|
||||
@@ -989,7 +989,6 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
if (this.health < Short.MIN_VALUE) this.health = Short.MIN_VALUE; // CraftBukkit
|
||||
nbttagcompound.setShort("Health", (short) this.health);
|
||||
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
|
||||
nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
|
||||
@@ -1013,6 +1012,10 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
if (this.health < -32768) {
|
||||
this.health = -32768;
|
||||
}
|
||||
|
||||
this.health = nbttagcompound.getShort("Health");
|
||||
if (!nbttagcompound.hasKey("Health")) {
|
||||
this.health = this.getMaxHealth();
|
||||
@@ -1095,12 +1098,12 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
// MethodProfiler.a("ai"); // CraftBukkit - not in production code
|
||||
if (this.P()) {
|
||||
if (this.Q()) {
|
||||
this.aZ = false;
|
||||
this.aW = 0.0F;
|
||||
this.aX = 0.0F;
|
||||
this.aY = 0.0F;
|
||||
} else if (this.aE()) {
|
||||
} else if (this.aF()) {
|
||||
if (this.c_()) {
|
||||
MethodProfiler.a("newAi");
|
||||
this.z_();
|
||||
@@ -1114,8 +1117,8 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
// MethodProfiler.a(); // CraftBukkit - not in production code
|
||||
boolean flag = this.aT();
|
||||
boolean flag1 = this.aU();
|
||||
boolean flag = this.aU();
|
||||
boolean flag1 = this.aV();
|
||||
|
||||
if (this.aZ) {
|
||||
if (flag) {
|
||||
@@ -1123,7 +1126,7 @@ public abstract class EntityLiving extends Entity {
|
||||
} else if (flag1) {
|
||||
this.motY += 0.03999999910593033D;
|
||||
} else if (this.onGround && this.q == 0) {
|
||||
this.ab();
|
||||
this.ac();
|
||||
this.q = 10;
|
||||
}
|
||||
} else {
|
||||
@@ -1135,7 +1138,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aY *= 0.9F;
|
||||
float f = this.al;
|
||||
|
||||
this.al *= this.D_();
|
||||
this.al *= this.J();
|
||||
this.a(this.aW, this.aX);
|
||||
this.al = f;
|
||||
// MethodProfiler.a("push"); // CraftBukkit - not in production code
|
||||
@@ -1158,19 +1161,19 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean aE() {
|
||||
protected boolean aF() {
|
||||
return !this.world.isStatic;
|
||||
}
|
||||
|
||||
protected boolean P() {
|
||||
protected boolean Q() {
|
||||
return this.health <= 0;
|
||||
}
|
||||
|
||||
public boolean O() {
|
||||
public boolean P() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void ab() {
|
||||
protected void ac() {
|
||||
this.motY = 0.41999998688697815D;
|
||||
if (this.hasEffect(MobEffectList.JUMP)) {
|
||||
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
|
||||
@@ -1190,7 +1193,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aF() {
|
||||
protected void aG() {
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||
|
||||
if (entityhuman != null) {
|
||||
@@ -1214,7 +1217,7 @@ public abstract class EntityLiving extends Entity {
|
||||
protected void z_() {
|
||||
++this.aV;
|
||||
//MethodProfiler.a("checkDespawn"); // CraftBukkit - not in production code
|
||||
this.aF();
|
||||
this.aG();
|
||||
//MethodProfiler.a(); // CraftBukkit - not in production code
|
||||
//MethodProfiler.a("sensing"); // CraftBukkit - not in production code
|
||||
this.m.a();
|
||||
@@ -1242,15 +1245,14 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
protected void d_() {
|
||||
++this.aV;
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||
|
||||
this.aF();
|
||||
this.aG();
|
||||
this.aW = 0.0F;
|
||||
this.aX = 0.0F;
|
||||
float f = 8.0F;
|
||||
|
||||
if (this.random.nextFloat() < 0.02F) {
|
||||
entityhuman = this.world.findNearbyPlayer(this, (double) f);
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, (double) f);
|
||||
|
||||
if (entityhuman != null) {
|
||||
this.r = entityhuman;
|
||||
this.bc = 10 + this.random.nextInt(20);
|
||||
@@ -1260,7 +1262,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
if (this.r != null) {
|
||||
this.a(this.r, 10.0F, (float) this.C());
|
||||
this.a(this.r, 10.0F, (float) this.D());
|
||||
if (this.bc-- <= 0 || this.r.dead || this.r.j(this) > (double) (f * f)) {
|
||||
this.r = null;
|
||||
}
|
||||
@@ -1273,15 +1275,15 @@ public abstract class EntityLiving extends Entity {
|
||||
this.pitch = this.ba;
|
||||
}
|
||||
|
||||
boolean flag = this.aT();
|
||||
boolean flag1 = this.aU();
|
||||
boolean flag = this.aU();
|
||||
boolean flag1 = this.aV();
|
||||
|
||||
if (flag || flag1) {
|
||||
this.aZ = this.random.nextFloat() < 0.8F;
|
||||
}
|
||||
}
|
||||
|
||||
public int C() {
|
||||
public int D() {
|
||||
return 40;
|
||||
}
|
||||
|
||||
@@ -1328,13 +1330,13 @@ public abstract class EntityLiving extends Entity {
|
||||
return f + f3;
|
||||
}
|
||||
|
||||
public void aG() {}
|
||||
public void aH() {}
|
||||
|
||||
public boolean canSpawn() {
|
||||
return this.world.containsEntity(this.boundingBox) && this.world.getCubes(this, this.boundingBox).size() == 0 && !this.world.containsLiquid(this.boundingBox);
|
||||
}
|
||||
|
||||
protected void aH() {
|
||||
protected void aI() {
|
||||
// CraftBukkit start
|
||||
EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, this.getBukkitEntity(), EntityDamageEvent.DamageCause.VOID, 4);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@@ -1347,7 +1349,7 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
public Vec3D aI() {
|
||||
public Vec3D aJ() {
|
||||
return this.f(1.0F);
|
||||
}
|
||||
|
||||
@@ -1383,7 +1385,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void aJ() {
|
||||
protected void aK() {
|
||||
Iterator iterator = this.effects.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1423,7 +1425,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void aK() {
|
||||
public void aL() {
|
||||
Iterator iterator = this.effects.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1473,7 +1475,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean aM() {
|
||||
public boolean aN() {
|
||||
return this.getMonsterType() == MonsterType.UNDEAD;
|
||||
}
|
||||
|
||||
@@ -1489,7 +1491,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.e = true;
|
||||
}
|
||||
|
||||
protected float D_() {
|
||||
protected float J() {
|
||||
float f = 1.0F;
|
||||
|
||||
if (this.hasEffect(MobEffectList.FASTER_MOVEMENT)) {
|
||||
|
Reference in New Issue
Block a user