mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Update to Minecraft 1.7
This commit is contained in:
@@ -71,7 +71,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public void o_() {
|
||||
public void m_() {
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepTicks;
|
||||
if (this.sleepTicks > 100) {
|
||||
@@ -92,9 +92,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
super.o_();
|
||||
super.m_();
|
||||
if (!this.world.isStatic && this.activeContainer != null && !this.activeContainer.b(this)) {
|
||||
this.x();
|
||||
this.y();
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
|
||||
@@ -139,20 +139,20 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean C() {
|
||||
protected boolean D() {
|
||||
return this.health <= 0 || this.isSleeping();
|
||||
}
|
||||
|
||||
protected void x() {
|
||||
protected void y() {
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
|
||||
public void D() {
|
||||
public void E() {
|
||||
double d0 = this.locX;
|
||||
double d1 = this.locY;
|
||||
double d2 = this.locZ;
|
||||
|
||||
super.D();
|
||||
super.E();
|
||||
this.n = this.o;
|
||||
this.o = 0.0F;
|
||||
this.i(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
@@ -172,7 +172,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.aa = (float) this.q / 8.0F;
|
||||
}
|
||||
|
||||
public void u() {
|
||||
public void v() {
|
||||
// CraftBukkit - spawnMonsters -> allowMonsters
|
||||
if (!this.world.allowMonsters && this.health < 20 && this.ticksLived % 20 * 12 == 0) {
|
||||
this.b(1);
|
||||
@@ -180,7 +180,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
this.inventory.f();
|
||||
this.n = this.o;
|
||||
super.u();
|
||||
super.v();
|
||||
float f = MathHelper.a(this.motX * this.motX + this.motZ * this.motZ);
|
||||
// CraftBukkit - Math -> TrigMath
|
||||
float f1 = (float) TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
|
||||
@@ -248,7 +248,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public void E() {
|
||||
public void F() {
|
||||
this.a(this.inventory.splitStack(this.inventory.itemInHandIndex, 1), false);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void a(ItemStack itemstack, boolean flag) {
|
||||
if (itemstack != null) {
|
||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.s(), this.locZ, itemstack);
|
||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.t(), this.locZ, itemstack);
|
||||
|
||||
entityitem.pickupDelay = 40;
|
||||
float f = 0.1F;
|
||||
@@ -372,11 +372,11 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void receive(Entity entity, int i) {}
|
||||
|
||||
public float s() {
|
||||
public float t() {
|
||||
return 0.12F;
|
||||
}
|
||||
|
||||
protected void j_() {
|
||||
protected void s() {
|
||||
this.height = 1.62F;
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean t() {
|
||||
protected boolean j_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(entityliving instanceof EntityHuman) || this.t()) {
|
||||
if (!(entityliving instanceof EntityHuman) || this.j_()) {
|
||||
List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).b(16.0D, 4.0D, 16.0D));
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
@@ -459,7 +459,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
EntityWolf entitywolf1 = (EntityWolf) entity;
|
||||
|
||||
if (entitywolf1.isTamed() && entitywolf1.E() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
|
||||
if (entitywolf1.isTamed() && entitywolf1.F() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.entity.Entity bukkitTarget = entity == null ? null : entityliving.getBukkitEntity();
|
||||
|
||||
@@ -502,32 +502,32 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void c(Entity entity) {
|
||||
if (!entity.a(this)) {
|
||||
ItemStack itemstack = this.F();
|
||||
ItemStack itemstack = this.G();
|
||||
|
||||
if (itemstack != null && entity instanceof EntityLiving) {
|
||||
itemstack.a((EntityLiving) entity);
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0) {
|
||||
itemstack.a(this);
|
||||
this.G();
|
||||
this.H();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack F() {
|
||||
public ItemStack G() {
|
||||
return this.inventory.getItemInHand();
|
||||
}
|
||||
|
||||
public void G() {
|
||||
public void H() {
|
||||
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
|
||||
}
|
||||
|
||||
public double H() {
|
||||
public double I() {
|
||||
return (double) (this.height - 0.5F);
|
||||
}
|
||||
|
||||
public void k_() {
|
||||
public void w() {
|
||||
this.q = -1;
|
||||
this.p = true;
|
||||
}
|
||||
@@ -562,19 +562,19 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
ItemStack itemstack = this.F();
|
||||
ItemStack itemstack = this.G();
|
||||
|
||||
if (itemstack != null && entity instanceof EntityLiving) {
|
||||
itemstack.a((EntityLiving) entity, this);
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0) {
|
||||
itemstack.a(this);
|
||||
this.G();
|
||||
this.H();
|
||||
}
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
if (entity.S()) {
|
||||
if (entity.T()) {
|
||||
this.a((EntityLiving) entity, true);
|
||||
}
|
||||
|
||||
@@ -593,13 +593,13 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean J() {
|
||||
return !this.sleeping && super.J();
|
||||
public boolean K() {
|
||||
return !this.sleeping && super.K();
|
||||
}
|
||||
|
||||
public EnumBedError a(int i, int j, int k) {
|
||||
if (!this.world.isStatic) {
|
||||
if (this.isSleeping() || !this.S()) {
|
||||
if (this.isSleeping() || !this.T()) {
|
||||
return EnumBedError.OTHER_PROBLEM;
|
||||
}
|
||||
|
||||
@@ -695,13 +695,13 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void a(boolean flag, boolean flag1, boolean flag2) {
|
||||
this.b(0.6F, 1.8F);
|
||||
this.j_();
|
||||
this.s();
|
||||
ChunkCoordinates chunkcoordinates = this.A;
|
||||
ChunkCoordinates chunkcoordinates1 = this.A;
|
||||
|
||||
if (chunkcoordinates != null && this.world.getTypeId(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z) == Block.BED.id) {
|
||||
BlockBed.a(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, false);
|
||||
chunkcoordinates1 = BlockBed.g(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
|
||||
chunkcoordinates1 = BlockBed.f(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
|
||||
if (chunkcoordinates1 == null) {
|
||||
chunkcoordinates1 = new ChunkCoordinates(chunkcoordinates.x, chunkcoordinates.y + 1, chunkcoordinates.z);
|
||||
}
|
||||
@@ -755,7 +755,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
if (world.getTypeId(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z) != Block.BED.id) {
|
||||
return null;
|
||||
} else {
|
||||
ChunkCoordinates chunkcoordinates1 = BlockBed.g(world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
|
||||
ChunkCoordinates chunkcoordinates1 = BlockBed.f(world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
|
||||
|
||||
return chunkcoordinates1;
|
||||
}
|
||||
@@ -790,8 +790,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void a(Statistic statistic, int i) {}
|
||||
|
||||
protected void N() {
|
||||
super.N();
|
||||
protected void O() {
|
||||
super.O();
|
||||
this.a(StatisticList.u, 1);
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
if (i > 0) {
|
||||
this.a(StatisticList.q, i);
|
||||
}
|
||||
} else if (this.ac()) {
|
||||
} else if (this.ad()) {
|
||||
i = Math.round(MathHelper.a(d0 * d0 + d2 * d2) * 100.0F);
|
||||
if (i > 0) {
|
||||
this.a(StatisticList.m, i);
|
||||
@@ -871,7 +871,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public void O() {
|
||||
public void P() {
|
||||
if (this.D > 0) {
|
||||
this.D = 10;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user