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/BlockPumpkin.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/BlockPumpkin.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockPumpkin.java | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPumpkin.java b/src/main/java/net/minecraft/server/BlockPumpkin.java index f848a079..6f7788c4 100644 --- a/src/main/java/net/minecraft/server/BlockPumpkin.java +++ b/src/main/java/net/minecraft/server/BlockPumpkin.java @@ -10,34 +10,13 @@ public class BlockPumpkin extends BlockDirectional { private boolean a; - protected BlockPumpkin(int i, int j, boolean flag) { + protected BlockPumpkin(int i, boolean flag) { super(i, Material.PUMPKIN); - this.textureId = j; this.b(true); this.a = flag; this.a(CreativeModeTab.b); } - public int a(int i, int j) { - if (i == 1) { - return this.textureId; - } else if (i == 0) { - return this.textureId; - } else { - int k = this.textureId + 1 + 16; - - if (this.a) { - ++k; - } - - return j == 2 && i == 2 ? k : (j == 3 && i == 5 ? k : (j == 0 && i == 3 ? k : (j == 1 && i == 4 ? k : this.textureId + 16))); - } - } - - public int a(int i) { - return i == 1 ? this.textureId : (i == 0 ? this.textureId : (i == 3 ? this.textureId + 1 + 16 : this.textureId + 16)); - } - public void onPlace(World world, int i, int j, int k) { super.onPlace(world, i, j, k); if (world.getTypeId(i, j - 1, k) == Block.SNOW_BLOCK.id && world.getTypeId(i, j - 2, k) == Block.SNOW_BLOCK.id) { @@ -100,13 +79,13 @@ public class BlockPumpkin extends BlockDirectional { public boolean canPlace(World world, int i, int j, int k) { int l = world.getTypeId(i, j, k); - return (l == 0 || Block.byId[l].material.isReplaceable()) && world.v(i, j - 1, k); + return (l == 0 || Block.byId[l].material.isReplaceable()) && world.w(i, j - 1, k); } - public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) { + public void postPlace(World world, int i, int j, int k, EntityLiving entityliving, ItemStack itemstack) { int l = MathHelper.floor((double) (entityliving.yaw * 4.0F / 360.0F) + 2.5D) & 3; - world.setData(i, j, k, l); + world.setData(i, j, k, l, 2); } // CraftBukkit start |