summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/Entity.java
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-12-19 22:03:52 -0600
committerfeildmaster <admin@feildmaster.com>2012-12-20 10:43:00 -0600
commit23b67643741d5754af4de020a29d557078f9f81d (patch)
tree90e1a32f7eb94af49a381cb6bc34bf6247f0efe6 /src/main/java/net/minecraft/server/Entity.java
parent9f1bf124eec7c20f16b2034fd9fba55f70c805fd (diff)
downloadcraftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar
craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.gz
craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.lz
craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.xz
craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.zip
Update CraftBukkit to Minecraft 1.4.6
Diffstat (limited to 'src/main/java/net/minecraft/server/Entity.java')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ba09ace7..1b1cd912 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -99,11 +99,11 @@ public abstract class Entity {
public boolean am;
public int portalCooldown;
protected boolean ao;
- private int h;
+ protected int ap;
public int dimension;
- protected int aq;
+ protected int ar;
private boolean invulnerable;
- public EnumEntitySize ar;
+ public EnumEntitySize as;
public UUID uniqueId = UUID.randomUUID(); // CraftBukkit
public boolean valid = false; // CraftBukkit
@@ -139,9 +139,9 @@ public abstract class Entity {
this.fireProof = false;
this.datawatcher = new DataWatcher();
this.ah = false;
- this.aq = 0;
+ this.ar = 0;
this.invulnerable = false;
- this.ar = EnumEntitySize.SIZE_2;
+ this.as = EnumEntitySize.SIZE_2;
this.world = world;
this.setPosition(0.0D, 0.0D, 0.0D);
if (world != null) {
@@ -177,17 +177,17 @@ public abstract class Entity {
float f2 = f % 2.0F;
if ((double) f2 < 0.375D) {
- this.ar = EnumEntitySize.SIZE_1;
+ this.as = EnumEntitySize.SIZE_1;
} else if ((double) f2 < 0.75D) {
- this.ar = EnumEntitySize.SIZE_2;
+ this.as = EnumEntitySize.SIZE_2;
} else if ((double) f2 < 1.0D) {
- this.ar = EnumEntitySize.SIZE_3;
+ this.as = EnumEntitySize.SIZE_3;
} else if ((double) f2 < 1.375D) {
- this.ar = EnumEntitySize.SIZE_4;
+ this.as = EnumEntitySize.SIZE_4;
} else if ((double) f2 < 1.75D) {
- this.ar = EnumEntitySize.SIZE_5;
+ this.as = EnumEntitySize.SIZE_5;
} else {
- this.ar = EnumEntitySize.SIZE_6;
+ this.as = EnumEntitySize.SIZE_6;
}
}
@@ -243,7 +243,6 @@ public abstract class Entity {
this.vehicle = null;
}
- ++this.ticksLived;
this.P = this.Q;
this.lastX = this.locX;
this.lastY = this.locY;
@@ -259,8 +258,8 @@ public abstract class Entity {
i = this.z();
if (this.ao) {
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
- if (this.vehicle == null && this.h++ >= i) {
- this.h = i;
+ if (this.vehicle == null && this.ap++ >= i) {
+ this.ap = i;
this.portalCooldown = this.ab();
byte b0;
@@ -276,12 +275,12 @@ public abstract class Entity {
this.ao = false;
}
} else {
- if (this.h > 0) {
- this.h -= 4;
+ if (this.ap > 0) {
+ this.ap -= 4;
}
- if (this.h < 0) {
- this.h = 0;
+ if (this.ap < 0) {
+ this.ap = 0;
}
}
@@ -398,6 +397,7 @@ public abstract class Entity {
public void setOnFire(int i) {
int j = i * 20;
+ j = EnchantmentProtection.a(this, j);
if (this.fireTicks < j) {
this.fireTicks = j;
}
@@ -760,7 +760,7 @@ public abstract class Entity {
}
}
- protected void makeSound(String s, float f, float f1) {
+ public void makeSound(String s, float f, float f1) {
this.world.makeSound(this, s, f, f1);
}
@@ -868,7 +868,7 @@ public abstract class Entity {
int l = this.world.getTypeId(i, j, k);
if (l != 0 && Block.byId[l].material == material) {
- float f = BlockFluids.d(this.world.getData(i, j, k)) - 0.11111111F;
+ float f = BlockFluids.e(this.world.getData(i, j, k)) - 0.11111111F;
float f1 = (float) (j + 1) - f;
return d0 < (double) f1;
@@ -1341,7 +1341,7 @@ public abstract class Entity {
}
public void V() {
- if (!(this.passenger instanceof EntityHuman) || !((EntityHuman) this.passenger).bW()) {
+ if (!(this.passenger instanceof EntityHuman) || !((EntityHuman) this.passenger).bV()) {
this.passenger.T = this.T;
this.passenger.U = this.U + this.X() + this.passenger.W();
this.passenger.V = this.V;
@@ -1478,7 +1478,7 @@ public abstract class Entity {
double d1 = this.lastZ - this.locZ;
if (!this.world.isStatic && !this.ao) {
- this.aq = Direction.a(d0, d1);
+ this.ar = Direction.a(d0, d1);
}
this.ao = true;
@@ -1722,7 +1722,7 @@ public abstract class Entity {
entity.d(nbttagcompound);
this.e(nbttagcompound);
this.portalCooldown = entity.portalCooldown;
- this.aq = entity.aq;
+ this.ar = entity.ar;
}
public void b(int i) {
@@ -1737,7 +1737,7 @@ public abstract class Entity {
this.world.kill(this);
this.dead = false;
this.world.methodProfiler.a("reposition");
- minecraftserver.getServerConfigurationManager().a(this, j, worldserver, worldserver1);
+ minecraftserver.getPlayerList().a(this, j, worldserver, worldserver1);
this.world.methodProfiler.c("reloading");
Entity entity = EntityTypes.createEntityByName(EntityTypes.b(this), worldserver1);
@@ -1763,7 +1763,7 @@ public abstract class Entity {
}
public int at() {
- return this.aq;
+ return this.ar;
}
public boolean au() {