diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-13 17:33:27 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-15 13:28:59 -0500 |
commit | 83d29e461c85733f0113b6eb19db6e3b42da2949 (patch) | |
tree | b3063a1c28f478ab368d5ba3413a842def68c28f /src/main/java/net/minecraft/server/BlockCactus.java | |
parent | ba6e4c38cfa98ad291974195cc46d70a4f138ac1 (diff) | |
download | craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.gz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.lz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.xz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.zip |
Update CraftBukkit to Minecraft 1.5
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockCactus.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockCactus.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java index dd680201..83cc09da 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -6,13 +6,13 @@ import org.bukkit.event.entity.EntityDamageByBlockEvent; // CraftBukkit public class BlockCactus extends Block { - protected BlockCactus(int i, int j) { - super(i, j, Material.CACTUS); + protected BlockCactus(int i) { + super(i, Material.CACTUS); this.b(true); this.a(CreativeModeTab.c); } - public void b(World world, int i, int j, int k, Random random) { + public void a(World world, int i, int j, int k, Random random) { if (world.isEmpty(i, j + 1, k)) { int l; @@ -25,24 +25,21 @@ public class BlockCactus extends Block { if (i1 == 15) { org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j + 1, k, this.id, 0); // CraftBukkit - world.setData(i, j, k, 0); + world.setData(i, j, k, 0, 4); + this.doPhysics(world, i, j + 1, k, this.id); } else { - world.setData(i, j, k, i1 + 1); + world.setData(i, j, k, i1 + 1, 4); } } } } - public AxisAlignedBB e(World world, int i, int j, int k) { + public AxisAlignedBB b(World world, int i, int j, int k) { float f = 0.0625F; return AxisAlignedBB.a().a((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f)); } - public int a(int i) { - return i == 1 ? this.textureId - 1 : (i == 0 ? this.textureId + 1 : this.textureId); - } - public boolean b() { return false; } @@ -56,17 +53,16 @@ public class BlockCactus extends Block { } public boolean canPlace(World world, int i, int j, int k) { - return !super.canPlace(world, i, j, k) ? false : this.d(world, i, j, k); + return !super.canPlace(world, i, j, k) ? false : this.f(world, i, j, k); } public void doPhysics(World world, int i, int j, int k, int l) { - if (!this.d(world, i, j, k)) { - this.c(world, i, j, k, world.getData(i, j, k), 0); - world.setTypeId(i, j, k, 0); + if (!this.f(world, i, j, k)) { + world.setAir(i, j, k, true); } } - public boolean d(World world, int i, int j, int k) { + public boolean f(World world, int i, int j, int k) { if (world.getMaterial(i - 1, j, k).isBuildable()) { return false; } else if (world.getMaterial(i + 1, j, k).isBuildable()) { |