mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
Updated to rename revision 02
This commit is contained in:
@@ -46,13 +46,17 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
public boolean sleeping;
|
||||
public boolean fauxSleeping;
|
||||
public String spawnWorld = "";
|
||||
|
||||
public HumanEntity getBukkitEntity() {
|
||||
return (HumanEntity) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public ChunkCoordinates F;
|
||||
public int sleepTicks; // CraftBukkit - private -> public
|
||||
public float G;
|
||||
public float H;
|
||||
private ChunkCoordinates server;
|
||||
private ChunkCoordinates b;
|
||||
private ChunkCoordinates c;
|
||||
public int I = 20;
|
||||
protected boolean J = false;
|
||||
@@ -233,7 +237,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
vec3d1.a(-this.pitch * 3.1415927F / 180.0F);
|
||||
vec3d1.b(-this.yaw * 3.1415927F / 180.0F);
|
||||
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.y(), this.locZ);
|
||||
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
|
||||
this.world.a("iconcrack_" + itemstack.getItem().id, vec3d1.a, vec3d1.b, vec3d1.c, vec3d.a, vec3d.b + 0.05D, vec3d.c);
|
||||
}
|
||||
|
||||
@@ -395,13 +399,13 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.a(this.inventory.splitStack(this.inventory.itemInHandIndex, 1), false);
|
||||
}
|
||||
|
||||
public void b(ItemStack itemstack) {
|
||||
public void drop(ItemStack itemstack) {
|
||||
this.a(itemstack, false);
|
||||
}
|
||||
|
||||
public void a(ItemStack itemstack, boolean flag) {
|
||||
if (itemstack != null) {
|
||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.y(), this.locZ, itemstack);
|
||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.getHeadHeight(), this.locZ, itemstack);
|
||||
|
||||
entityitem.pickupDelay = 40;
|
||||
float f = 0.1F;
|
||||
@@ -505,7 +509,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
// CraftBukkit end
|
||||
|
||||
if (nbttagcompound.hasKey("SpawnX") && nbttagcompound.hasKey("SpawnY") && nbttagcompound.hasKey("SpawnZ")) {
|
||||
this.server = new ChunkCoordinates(nbttagcompound.getInt("SpawnX"), nbttagcompound.getInt("SpawnY"), nbttagcompound.getInt("SpawnZ"));
|
||||
this.b = new ChunkCoordinates(nbttagcompound.getInt("SpawnX"), nbttagcompound.getInt("SpawnY"), nbttagcompound.getInt("SpawnZ"));
|
||||
}
|
||||
|
||||
this.foodData.a(nbttagcompound);
|
||||
@@ -521,10 +525,10 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
nbttagcompound.setFloat("XpP", this.exp);
|
||||
nbttagcompound.setInt("XpLevel", this.expLevel);
|
||||
nbttagcompound.setInt("XpTotal", this.expTotal);
|
||||
if (this.server != null) {
|
||||
nbttagcompound.setInt("SpawnX", this.server.x);
|
||||
nbttagcompound.setInt("SpawnY", this.server.y);
|
||||
nbttagcompound.setInt("SpawnZ", this.server.z);
|
||||
if (this.b != null) {
|
||||
nbttagcompound.setInt("SpawnX", this.b.x);
|
||||
nbttagcompound.setInt("SpawnY", this.b.y);
|
||||
nbttagcompound.setInt("SpawnZ", this.b.z);
|
||||
nbttagcompound.setString("SpawnWorld", spawnWorld); // CraftBukkit - fixes bed spawns for multiworld worlds
|
||||
}
|
||||
|
||||
@@ -532,15 +536,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.abilities.a(nbttagcompound);
|
||||
}
|
||||
|
||||
public void a(IInventory iinventory) {}
|
||||
public void openContainer(IInventory iinventory) {}
|
||||
|
||||
public void c(int i, int j, int k) {}
|
||||
public void startEnchanting(int i, int j, int k) {}
|
||||
|
||||
public void b(int i, int j, int k) {}
|
||||
public void startCrafting(int i, int j, int k) {}
|
||||
|
||||
public void receive(Entity entity, int i) {}
|
||||
|
||||
public float y() {
|
||||
public float getHeadHeight() {
|
||||
return 0.12F;
|
||||
}
|
||||
|
||||
@@ -707,13 +711,13 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.health -= i;
|
||||
}
|
||||
|
||||
public void a(TileEntityFurnace tileentityfurnace) {}
|
||||
public void openFurnace(TileEntityFurnace tileentityfurnace) {}
|
||||
|
||||
public void a(TileEntityDispenser tileentitydispenser) {}
|
||||
public void openDispenser(TileEntityDispenser tileentitydispenser) {}
|
||||
|
||||
public void a(TileEntitySign tileentitysign) {}
|
||||
|
||||
public void a(TileEntityBrewingStand tileentitybrewingstand) {}
|
||||
public void openBrewingStand(TileEntityBrewingStand tileentitybrewingstand) {}
|
||||
|
||||
public void e(Entity entity) {
|
||||
if (!entity.b(this)) {
|
||||
@@ -864,7 +868,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public void d(Entity entity) {}
|
||||
|
||||
public void a(ItemStack itemstack) {}
|
||||
public void carriedChanged(ItemStack itemstack) {}
|
||||
|
||||
public void die() {
|
||||
super.die();
|
||||
@@ -1028,7 +1032,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
this.a(this.F);
|
||||
this.setRespawnPosition(this.F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,15 +1067,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
public void a(String s) {}
|
||||
|
||||
public ChunkCoordinates getBed() {
|
||||
return this.server;
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public void a(ChunkCoordinates chunkcoordinates) {
|
||||
public void setRespawnPosition(ChunkCoordinates chunkcoordinates) {
|
||||
if (chunkcoordinates != null) {
|
||||
this.server = new ChunkCoordinates(chunkcoordinates);
|
||||
this.b = new ChunkCoordinates(chunkcoordinates);
|
||||
this.spawnWorld = this.world.worldData.name; // CraftBukkit
|
||||
} else {
|
||||
this.server = null;
|
||||
this.b = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1108,10 +1112,10 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
super.a(f, f1);
|
||||
}
|
||||
|
||||
this.b(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
}
|
||||
|
||||
public void b(double d0, double d1, double d2) {
|
||||
public void checkMovement(double d0, double d1, double d2) {
|
||||
if (this.vehicle == null) {
|
||||
int i;
|
||||
|
||||
@@ -1285,10 +1289,4 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.exp = entityhuman.exp;
|
||||
this.q = entityhuman.q;
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
public HumanEntity getBukkitEntity() {
|
||||
return (HumanEntity) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
Reference in New Issue
Block a user