diff options
author | mbax <matt@phozop.net> | 2013-11-04 07:07:38 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:26:12 -0600 |
commit | 2726696652179a5ead7dc07dd39edf7dfda687f7 (patch) | |
tree | ff78e22fdd4fc01889a5f6cc482b599f965cd93a /src/main/java/net/minecraft/server/BlockCactus.java | |
parent | ff8b70fbb7a96b9d2ff078afcf3b3ff90f200981 (diff) | |
download | craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.gz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.lz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.xz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.zip |
Update CraftBukkit to Minecraft 1.7.2
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockCactus.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockCactus.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java index 03eece78..421af044 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -6,9 +6,9 @@ import org.bukkit.event.entity.EntityDamageByBlockEvent; // CraftBukkit public class BlockCactus extends Block { - protected BlockCactus(int i) { - super(i, Material.CACTUS); - this.b(true); + protected BlockCactus() { + super(Material.CACTUS); + this.a(true); this.a(CreativeModeTab.c); } @@ -16,7 +16,7 @@ public class BlockCactus extends Block { if (world.isEmpty(i, j + 1, k)) { int l; - for (l = 1; world.getTypeId(i, j - l, k) == this.id; ++l) { + for (l = 1; world.getType(i, j - l, k) == this; ++l) { ; } @@ -24,9 +24,9 @@ public class BlockCactus extends Block { int i1 = world.getData(i, j, k); if (i1 == 15) { - org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j + 1, k, this.id, 0); // CraftBukkit + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j + 1, k, this, 0); // CraftBukkit world.setData(i, j, k, 0, 4); - this.doPhysics(world, i, j + 1, k, this.id); + this.doPhysics(world, i, j + 1, k, this); } else { world.setData(i, j, k, i1 + 1, 4); } @@ -34,13 +34,13 @@ public class BlockCactus extends Block { } } - public AxisAlignedBB b(World world, int i, int j, int k) { + public AxisAlignedBB a(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 boolean b() { + public boolean d() { return false; } @@ -48,33 +48,33 @@ public class BlockCactus extends Block { return false; } - public int d() { + public int b() { return 13; } public boolean canPlace(World world, int i, int j, int k) { - return !super.canPlace(world, i, j, k) ? false : this.f(world, i, j, k); + return !super.canPlace(world, i, j, k) ? false : this.j(world, i, j, k); } - public void doPhysics(World world, int i, int j, int k, int l) { - if (!this.f(world, i, j, k)) { + public void doPhysics(World world, int i, int j, int k, Block block) { + if (!this.j(world, i, j, k)) { world.setAir(i, j, k, true); } } - public boolean f(World world, int i, int j, int k) { - if (world.getMaterial(i - 1, j, k).isBuildable()) { + public boolean j(World world, int i, int j, int k) { + if (world.getType(i - 1, j, k).getMaterial().isBuildable()) { return false; - } else if (world.getMaterial(i + 1, j, k).isBuildable()) { + } else if (world.getType(i + 1, j, k).getMaterial().isBuildable()) { return false; - } else if (world.getMaterial(i, j, k - 1).isBuildable()) { + } else if (world.getType(i, j, k - 1).getMaterial().isBuildable()) { return false; - } else if (world.getMaterial(i, j, k + 1).isBuildable()) { + } else if (world.getType(i, j, k + 1).getMaterial().isBuildable()) { return false; } else { - int l = world.getTypeId(i, j - 1, k); + Block block = world.getType(i, j - 1, k); - return l == Block.CACTUS.id || l == Block.SAND.id; + return block == Blocks.CACTUS || block == Blocks.SAND; } } |