13
0
geforkt von Mirrors/Paper

Fix missing redstone event call with Eigencraft redstone (#8148)

Dieser Commit ist enthalten in:
Space Walker 2022-07-18 13:46:52 +02:00
Ursprung b4e9e20e79
Commit 2a189a99cd

Datei anzeigen

@ -1081,6 +1081,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ if (i != j) {
+ org.bukkit.event.block.BlockRedstoneEvent event = new org.bukkit.event.block.BlockRedstoneEvent(worldIn.getWorld().getBlockAt(pos1.getX(), pos1.getY(), pos1.getZ()), i, j);
+ worldIn.getCraftServer().getPluginManager().callEvent(event);
+
+ j = event.getNewCurrent();
+ state = state.setValue(POWER, j);
+
+ if (worldIn.getBlockState(pos1) == iblockstate) {
@ -1089,18 +1093,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (worldIn.setBlock(pos1, state, Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_CLIENTS))
+ turbo.updateNeighborShapes(worldIn, pos1, state);
+ }
+
+ // 1.16(.1?) dropped the need for blocks needing updates.
+ // Whether this is necessary after all is to be seen.
+// if (!worldIn.paperConfig.useEigencraftRedstone) {
+// // The new search algorithm keeps track of blocks needing updates in its own data structures,
+// // so only add anything to blocksNeedingUpdate if we're using the vanilla update algorithm.
+// this.getBlocksNeedingUpdate().add(pos1);
+//
+// for (EnumDirection enumfacing1 : EnumDirection.values()) {
+// this.getBlocksNeedingUpdate().add(pos1.shift(enumfacing1));
+// }
+// }
+ }
+
+ return state;