@@ -8,7 +8,7 @@
|
||||
+
|
||||
public class BlockRedstoneLamp extends Block {
|
||||
|
||||
public static final BlockStateBoolean a = BlockRedstoneTorch.LIT;
|
||||
public static final BlockStateBoolean LIT = BlockRedstoneTorch.LIT;
|
||||
@@ -36,6 +38,11 @@
|
||||
if (flag1) {
|
||||
world.getBlockTickList().a(blockposition, this, 4);
|
||||
@@ -18,18 +18,18 @@
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.LIT), 2);
|
||||
}
|
||||
}
|
||||
@@ -46,6 +53,11 @@
|
||||
@Override
|
||||
public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if ((Boolean) iblockdata.get(BlockRedstoneLamp.a) && !worldserver.isBlockIndirectlyPowered(blockposition)) {
|
||||
if ((Boolean) iblockdata.get(BlockRedstoneLamp.LIT) && !worldserver.isBlockIndirectlyPowered(blockposition)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.LIT), 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user