diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-01-14 21:03:48 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2012-01-15 10:52:37 +0100 |
commit | 61ec751ca11f5bff9ec2dd1644982d5628270004 (patch) | |
tree | 8829269e1c5807b55566d367bec5ee630d5dfb1d /src/main/java/net/minecraft/server/EntityFallingBlock.java | |
parent | 6495eee0c9fddcce2c2aa9bf9c45118abea180c1 (diff) | |
download | craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.gz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.lz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.xz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.zip |
Update for 1.1_01 renames.
We know these updates (can) break plugins bypassing Bukkit. They are needed for
smooth updates however. There will be another one right before before 1.1-R1.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFallingBlock.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFallingBlock.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index 8e2d3f8e..31730867 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -2,7 +2,7 @@ package net.minecraft.server; public class EntityFallingBlock extends Entity { - public int a; + public int id; public int data; // CraftBukkit public int b = 0; @@ -13,7 +13,7 @@ public class EntityFallingBlock extends Entity { // CraftBukkit - changed method signature public EntityFallingBlock(World world, double d0, double d1, double d2, int i, int data) { super(world); - this.a = i; + this.id = i; this.bf = true; this.data = data; // CraftBukkit this.b(0.98F, 0.98F); @@ -38,7 +38,7 @@ public class EntityFallingBlock extends Entity { } public void y_() { - if (this.a == 0) { + if (this.id == 0) { this.die(); } else { this.lastX = this.locX; @@ -54,7 +54,7 @@ public class EntityFallingBlock extends Entity { int j = MathHelper.floor(this.locY); int k = MathHelper.floor(this.locZ); - if (this.b == 1 && this.world.getTypeId(i, j, k) == this.a) { + if (this.b == 1 && this.world.getTypeId(i, j, k) == this.id) { this.world.setTypeId(i, j, k, 0); } else if (!this.world.isStatic && this.b == 1) { this.die(); @@ -67,24 +67,24 @@ public class EntityFallingBlock extends Entity { if (this.world.getTypeId(i, j, k) != Block.PISTON_MOVING.id) { this.die(); // CraftBukkit - setTypeId => setTypeIdAndData - if ((!this.world.a(this.a, i, j, k, true, 1) || BlockSand.g(this.world, i, j - 1, k) || !this.world.setTypeIdAndData(i, j, k, this.a, this.data)) && !this.world.isStatic) { - this.b(this.a, 1); + if ((!this.world.mayPlace(this.id, i, j, k, true, 1) || BlockSand.canFall(this.world, i, j - 1, k) || !this.world.setTypeIdAndData(i, j, k, this.id, this.data)) && !this.world.isStatic) { + this.b(this.id, 1); } } } else if (this.b > 100 && !this.world.isStatic) { - this.b(this.a, 1); + this.b(this.id, 1); this.die(); } } } protected void b(NBTTagCompound nbttagcompound) { - nbttagcompound.setByte("Tile", (byte) this.a); + nbttagcompound.setByte("Tile", (byte) this.id); nbttagcompound.setByte("Data", (byte) this.data); // CraftBukkit } protected void a(NBTTagCompound nbttagcompound) { - this.a = nbttagcompound.getByte("Tile") & 255; + this.id = nbttagcompound.getByte("Tile") & 255; this.data = nbttagcompound.getByte("Data") & 15; // CraftBukkit } } |