summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/BlockRedstoneLamp.patch13
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)) {