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/BlockRedstoneLamp.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/BlockRedstoneLamp.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockRedstoneLamp.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneLamp.java b/src/main/java/net/minecraft/server/BlockRedstoneLamp.java index e527e7fa..cb802e80 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneLamp.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneLamp.java @@ -8,8 +8,8 @@ public class BlockRedstoneLamp extends Block { private final boolean a; - public BlockRedstoneLamp(int i, boolean flag) { - super(i, Material.BUILDABLE_GLASS); + public BlockRedstoneLamp(boolean flag) { + super(Material.BUILDABLE_GLASS); this.a = flag; if (flag) { this.a(1.0F); @@ -19,7 +19,7 @@ public class BlockRedstoneLamp extends Block { public void onPlace(World world, int i, int j, int k) { if (!world.isStatic) { if (this.a && !world.isBlockIndirectlyPowered(i, j, k)) { - world.a(i, j, k, this.id, 4); + world.a(i, j, k, this, 4); } else if (!this.a && world.isBlockIndirectlyPowered(i, j, k)) { // CraftBukkit start if (CraftEventFactory.callRedstoneChange(world, i, j, k, 0, 15).getNewCurrent() != 15) { @@ -27,15 +27,15 @@ public class BlockRedstoneLamp extends Block { } // CraftBukkit end - world.setTypeIdAndData(i, j, k, Block.REDSTONE_LAMP_ON.id, 0, 2); + world.setTypeAndData(i, j, k, Blocks.REDSTONE_LAMP_ON, 0, 2); } } } - public void doPhysics(World world, int i, int j, int k, int l) { + public void doPhysics(World world, int i, int j, int k, Block block) { if (!world.isStatic) { if (this.a && !world.isBlockIndirectlyPowered(i, j, k)) { - world.a(i, j, k, this.id, 4); + world.a(i, j, k, this, 4); } else if (!this.a && world.isBlockIndirectlyPowered(i, j, k)) { // CraftBukkit start if (CraftEventFactory.callRedstoneChange(world, i, j, k, 0, 15).getNewCurrent() != 15) { @@ -43,7 +43,7 @@ public class BlockRedstoneLamp extends Block { } // CraftBukkit end - world.setTypeIdAndData(i, j, k, Block.REDSTONE_LAMP_ON.id, 0, 2); + world.setTypeAndData(i, j, k, Blocks.REDSTONE_LAMP_ON, 0, 2); } } } @@ -56,11 +56,15 @@ public class BlockRedstoneLamp extends Block { } // CraftBukkit end - world.setTypeIdAndData(i, j, k, Block.REDSTONE_LAMP_OFF.id, 0, 2); + world.setTypeAndData(i, j, k, Blocks.REDSTONE_LAMP_OFF, 0, 2); } } - public int getDropType(int i, Random random, int j) { - return Block.REDSTONE_LAMP_OFF.id; + public Item getDropType(int i, Random random, int j) { + return Item.getItemOf(Blocks.REDSTONE_LAMP_OFF); + } + + protected ItemStack j(int i) { + return new ItemStack(Blocks.REDSTONE_LAMP_OFF); } } |