diff options
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); } } |