mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
Fix missing redstone event call with Eigencraft redstone (#8148)
This commit is contained in:
parent
b4e9e20e79
commit
2a189a99cd
1 changed files with 4 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue