diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/BlockTrapdoor.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockTrapdoor.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockTrapdoor.java | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/BlockTrapdoor.java b/src/main/java/net/minecraft/server/BlockTrapdoor.java index 52cbbcf8..153e8961 100644 --- a/src/main/java/net/minecraft/server/BlockTrapdoor.java +++ b/src/main/java/net/minecraft/server/BlockTrapdoor.java @@ -25,20 +25,30 @@ public class BlockTrapdoor extends Block { return false; } + public int c() { + return 0; + } + public AxisAlignedBB e(World world, int i, int j, int k) { - this.a((IBlockAccess)world, i, j, k); // CraftBukkit - Make sure this points to the below method! + this.a(world, i, j, k); return super.e(world, i, j, k); } public void a(IBlockAccess iblockaccess, int i, int j, int k) { - this.c(iblockaccess.getData(i, j, k)); + this.d(iblockaccess.getData(i, j, k)); + } + + public void f() { + float f = 0.1875F; + + this.a(0.0F, 0.5F - f / 2.0F, 0.0F, 1.0F, 0.5F + f / 2.0F, 1.0F); } - public void c(int i) { + public void d(int i) { float f = 0.1875F; this.a(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F); - if (d(i)) { + if (e(i)) { if ((i & 3) == 0) { this.a(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); } @@ -105,9 +115,9 @@ public class BlockTrapdoor extends Block { --j1; } - if (!world.e(j1, j, k1)) { + if (!f(world.getTypeId(j1, j, k1))) { world.setTypeId(i, j, k, 0); - this.g(world, i, j, k, i1); + this.b(world, i, j, k, i1, 0); } // CraftBukkit start @@ -179,11 +189,21 @@ public class BlockTrapdoor extends Block { --i; } - return world.e(i, j, k); + return f(world.getTypeId(i, j, k)); } } - public static boolean d(int i) { + public static boolean e(int i) { return (i & 4) != 0; } + + private static boolean f(int i) { + if (i <= 0) { + return false; + } else { + Block block = Block.byId[i]; + + return block != null && block.material.j() && block.b() || block == Block.GLOWSTONE; + } + } } |