diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2014-06-26 13:05:08 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-07-08 14:31:10 -0500 |
commit | dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00 (patch) | |
tree | 062b1b273d0e0f337fde6b79f9377519d85c48c5 /src/main/java/net/minecraft/server/EntityFallingBlock.java | |
parent | a8628fd645e12ec22bc525f49dd25f68d094f3ef (diff) | |
download | craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.gz craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.lz craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.tar.xz craftbukkit-dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00.zip |
Update CraftBukkit to Minecraft 1.7.10
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFallingBlock.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFallingBlock.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index e0b99367..5576f151 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -9,7 +9,7 @@ public class EntityFallingBlock extends Entity { public Block id; // CraftBukkit - private -> public public int data; - public int b; + public int ticksLived; public boolean dropItem; private boolean f; private boolean hurtEntities; @@ -53,7 +53,7 @@ public class EntityFallingBlock extends Entity { protected void c() {} - public boolean Q() { + public boolean R() { return !this.dead; } @@ -64,7 +64,7 @@ public class EntityFallingBlock extends Entity { this.lastX = this.locX; this.lastY = this.locY; this.lastZ = this.locZ; - ++this.b; + ++this.ticksLived; this.motY -= 0.03999999910593033D; this.move(this.motX, this.motY, this.motZ); this.motX *= 0.9800000190734863D; @@ -75,9 +75,9 @@ public class EntityFallingBlock extends Entity { int j = MathHelper.floor(this.locY); int k = MathHelper.floor(this.locZ); - if (this.b == 1) { + if (this.ticksLived == 1) { // CraftBukkit - compare data and call event - if (this.b != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) { + if (this.ticksLived != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) { this.die(); return; } @@ -129,7 +129,7 @@ public class EntityFallingBlock extends Entity { this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F); } } - } else if (this.b > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.b > 600) { + } else if (this.ticksLived > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.ticksLived > 600) { if (this.dropItem) { this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F); } @@ -174,10 +174,10 @@ public class EntityFallingBlock extends Entity { } protected void b(NBTTagCompound nbttagcompound) { - nbttagcompound.setByte("Tile", (byte) Block.b(this.id)); - nbttagcompound.setInt("TileID", Block.b(this.id)); + nbttagcompound.setByte("Tile", (byte) Block.getId(this.id)); + nbttagcompound.setInt("TileID", Block.getId(this.id)); nbttagcompound.setByte("Data", (byte) this.data); - nbttagcompound.setByte("Time", (byte) this.b); + nbttagcompound.setByte("Time", (byte) this.ticksLived); nbttagcompound.setBoolean("DropItem", this.dropItem); nbttagcompound.setBoolean("HurtEntities", this.hurtEntities); nbttagcompound.setFloat("FallHurtAmount", this.fallHurtAmount); @@ -189,13 +189,13 @@ public class EntityFallingBlock extends Entity { protected void a(NBTTagCompound nbttagcompound) { if (nbttagcompound.hasKeyOfType("TileID", 99)) { - this.id = Block.e(nbttagcompound.getInt("TileID")); + this.id = Block.getById(nbttagcompound.getInt("TileID")); } else { - this.id = Block.e(nbttagcompound.getByte("Tile") & 255); + this.id = Block.getById(nbttagcompound.getByte("Tile") & 255); } this.data = nbttagcompound.getByte("Data") & 255; - this.b = nbttagcompound.getByte("Time") & 255; + this.ticksLived = nbttagcompound.getByte("Time") & 255; if (nbttagcompound.hasKeyOfType("HurtEntities", 99)) { this.hurtEntities = nbttagcompound.getBoolean("HurtEntities"); this.fallHurtAmount = nbttagcompound.getFloat("FallHurtAmount"); @@ -223,7 +223,7 @@ public class EntityFallingBlock extends Entity { public void a(CrashReportSystemDetails crashreportsystemdetails) { super.a(crashreportsystemdetails); - crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.b(this.id))); + crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.getId(this.id))); crashreportsystemdetails.a("Immitating block data", Integer.valueOf(this.data)); } |