diff options
author | md_5 <git@md-5.net> | 2017-12-07 10:59:30 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-12-07 10:59:30 +1100 |
commit | d063cd0d3b24012dc17f64be0c74eb6ce82db58b (patch) | |
tree | 983115d5af74a6c1821cc8ffc96cfbdc2c2bbeab | |
parent | cfd69330028afefa92f624382881bccf5619a104 (diff) | |
download | craftbukkit-d063cd0d3b24012dc17f64be0c74eb6ce82db58b.tar craftbukkit-d063cd0d3b24012dc17f64be0c74eb6ce82db58b.tar.gz craftbukkit-d063cd0d3b24012dc17f64be0c74eb6ce82db58b.tar.lz craftbukkit-d063cd0d3b24012dc17f64be0c74eb6ce82db58b.tar.xz craftbukkit-d063cd0d3b24012dc17f64be0c74eb6ce82db58b.zip |
Fix missing event call for BlockRedstoneLamp
-rw-r--r-- | nms-patches/BlockRedstoneLamp.patch | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nms-patches/BlockRedstoneLamp.patch b/nms-patches/BlockRedstoneLamp.patch index 1aec6322..e349acdc 100644 --- a/nms-patches/BlockRedstoneLamp.patch +++ b/nms-patches/BlockRedstoneLamp.patch @@ -9,8 +9,15 @@ public class BlockRedstoneLamp extends Block { private final boolean a; -@@ -20,6 +22,11 @@ +@@ -18,8 +20,18 @@ + public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { + if (!world.isClientSide) { if (this.a && !world.isBlockIndirectlyPowered(blockposition)) { ++ // CraftBukkit start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) { ++ return; ++ } ++ // CraftBukkit end world.setTypeAndData(blockposition, Blocks.REDSTONE_LAMP.getBlockData(), 2); } else if (!this.a && world.isBlockIndirectlyPowered(blockposition)) { + // CraftBukkit start @@ -21,7 +28,7 @@ world.setTypeAndData(blockposition, Blocks.LIT_REDSTONE_LAMP.getBlockData(), 2); } -@@ -31,6 +38,11 @@ +@@ -31,6 +43,11 @@ if (this.a && !world.isBlockIndirectlyPowered(blockposition)) { world.a(blockposition, (Block) this, 4); } else if (!this.a && world.isBlockIndirectlyPowered(blockposition)) { @@ -33,7 +40,7 @@ world.setTypeAndData(blockposition, Blocks.LIT_REDSTONE_LAMP.getBlockData(), 2); } -@@ -40,6 +52,11 @@ +@@ -40,6 +57,11 @@ public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { if (!world.isClientSide) { if (this.a && !world.isBlockIndirectlyPowered(blockposition)) { |