From 72f36890922863b9ceea413e9cb34263f2caf666 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 9 Jul 2020 09:12:57 +1000 Subject: [PATCH] SPIGOT-5965: BlockRedstoneEvent.setNewCurrent(0) crashes server --- nms-patches/BlockRedstoneWire.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nms-patches/BlockRedstoneWire.patch b/nms-patches/BlockRedstoneWire.patch index 294a29fa6b..5f909ebfc0 100644 --- a/nms-patches/BlockRedstoneWire.patch +++ b/nms-patches/BlockRedstoneWire.patch @@ -9,7 +9,7 @@ public class BlockRedstoneWire extends Block { public static final BlockStateEnum NORTH = BlockProperties.X; -@@ -213,7 +215,14 @@ +@@ -213,7 +215,16 @@ private void a(World world, BlockPosition blockposition, IBlockData iblockdata) { int i = this.a(world, blockposition); @@ -21,6 +21,8 @@ + world.getServer().getPluginManager().callEvent(event); + + i = event.getNewCurrent(); ++ } ++ if (oldPower != i) { + // CraftBukkit end if (world.getType(blockposition) == iblockdata) { world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneWire.POWER, i), 2);