@@ -9,10 +9,10 @@ add explicit block update suppression techniques, it's better
99than the server crashing.
1010
1111diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
12- index ff2622f007cf61028447523bbec0ec6076609923..d90edfdd7a7c0c1b31254fe1de19a91a66513d11 100644
12+ index faec81c45af77876ebdb33eb8395c2a33115c415..a8401a953a955a69f39fa13e9678d177796889f0 100644
1313--- a/net/minecraft/world/level/Level.java
1414+++ b/net/minecraft/world/level/Level.java
15- @@ -2110 ,7 +2110 ,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
15+ @@ -2118 ,7 +2118 ,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
1616 public void updateNeighbourForOutputSignal(final BlockPos pos, final Block changedBlock) {
1717 for (Direction direction : Direction.Plane.HORIZONTAL) {
1818 BlockPos relativePos = pos.relative(direction);
@@ -22,7 +22,7 @@ index ff2622f007cf61028447523bbec0ec6076609923..d90edfdd7a7c0c1b31254fe1de19a91a
2222 if (state.is(Blocks.COMPARATOR)) {
2323 this.neighborChanged(state, relativePos, changedBlock, null, false);
2424diff --git a/net/minecraft/world/level/block/DetectorRailBlock.java b/net/minecraft/world/level/block/DetectorRailBlock.java
25- index 5f09b65c6986579047662436d3ec4251338f55b3..ed718d3046e11c0652f0a5bb543bba4006e003c5 100644
25+ index 0caf401ef2e4f8646e429a476993ba06ee405445..816d9c71c26b5f08435bc4fdefe92af6592d5eb4 100644
2626--- a/net/minecraft/world/level/block/DetectorRailBlock.java
2727+++ b/net/minecraft/world/level/block/DetectorRailBlock.java
2828@@ -134,8 +134,8 @@ public class DetectorRailBlock extends BaseRailBlock {
@@ -37,7 +37,7 @@ index 5f09b65c6986579047662436d3ec4251338f55b3..ed718d3046e11c0652f0a5bb543bba40
3737 }
3838
3939diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java
40- index a03cc9176f98b30054701e03b51b8c054a6a0e3a..8571a2d238281f6791fe4bcaf9b5722c6c0cb01d 100644
40+ index 03c878a4f539e290dda30adcf5a375199be6e676..36f10c676db121dc1f9cebe85eadfd920d26de7d 100644
4141--- a/net/minecraft/world/level/block/PoweredRailBlock.java
4242+++ b/net/minecraft/world/level/block/PoweredRailBlock.java
4343@@ -102,8 +102,8 @@ public class PoweredRailBlock extends BaseRailBlock {
@@ -49,10 +49,10 @@ index a03cc9176f98b30054701e03b51b8c054a6a0e3a..8571a2d238281f6791fe4bcaf9b5722c
4949+ BlockState state = !ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(level, pos, 25) ? null : level.getBlockStateIfLoaded(pos);
5050+ if (state == null || !state.is(this)) { // Folia - block updates in unloaded chunks
5151 return false;
52- } else {
53- RailShape myShape = state.getValue(SHAPE);
52+ }
53+
5454diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
55- index 4f6205c6d75f195cafb756adbcaee683c7d6761b..759eb347299813c20226cc2fc5dc7718d12b7f56 100644
55+ index ba408de343d6fe8a2d88a6e4a644d102a16a298e..957c45b39e9d6f74fb9791ecd121b0e2bd6bc732 100644
5656--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
5757+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
5858@@ -215,8 +215,9 @@ public class RedStoneWireBlock extends Block {
@@ -67,7 +67,7 @@ index 4f6205c6d75f195cafb756adbcaee683c7d6761b..759eb347299813c20226cc2fc5dc7718
6767 BlockState blockStateDown = level.getBlockState(blockPos);
6868 if (blockStateDown.is(this)) {
6969diff --git a/net/minecraft/world/level/block/TripWireBlock.java b/net/minecraft/world/level/block/TripWireBlock.java
70- index 83823edc4a943e006e3237ecb9198a571a681873..04e5995409a3532947dfab1c8ef05bd546a6f66d 100644
70+ index 49510dc0ef82621953be8e485708872bd8b2b88b..e19a82ebb7b3be71e51ac28914de58fab32a708e 100644
7171--- a/net/minecraft/world/level/block/TripWireBlock.java
7272+++ b/net/minecraft/world/level/block/TripWireBlock.java
7373@@ -131,6 +131,7 @@ public class TripWireBlock extends Block {
@@ -79,7 +79,7 @@ index 83823edc4a943e006e3237ecb9198a571a681873..04e5995409a3532947dfab1c8ef05bd5
7979 if (block.is(this.hook)) {
8080 if (block.getValue(TripWireHookBlock.FACING) == direction.getOpposite()) {
8181diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
82- index 31f8b7225ae5804ed66e7b17862ee56ac6ae5237..82713a22a7c9c54c64616cbd96aac9dfb10cf4e3 100644
82+ index 9d08ce61f964bb3115c708091549a233dabcf0e3..8bcc8b6f83ab4d5a472741185511b5d84f4974be 100644
8383--- a/net/minecraft/world/level/block/TripWireHookBlock.java
8484+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
8585@@ -128,6 +128,7 @@ public class TripWireHookBlock extends Block {
@@ -91,10 +91,10 @@ index 31f8b7225ae5804ed66e7b17862ee56ac6ae5237..82713a22a7c9c54c64616cbd96aac9df
9191 if (wireState.is(Blocks.TRIPWIRE_HOOK)) {
9292 if (wireState.getValue(FACING) == direction.getOpposite()) {
9393diff --git a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
94- index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557cabbd4b037 100644
94+ index 4c3336fde3a82b8d41b47ade89e80add295940b2..16a0a789b930ec4fb92a03bc8f25e98053f0773a 100644
9595--- a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
9696+++ b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
97- @@ -147 ,7 +147 ,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
97+ @@ -149 ,7 +149 ,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
9898 public boolean runNext(final Level level) {
9999 Direction direction = NeighborUpdater.UPDATE_ORDER[this.idx++];
100100 BlockPos neighborPos = this.sourcePos.relative(direction);
@@ -104,15 +104,15 @@ index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557ca
104104 Orientation orientation = null;
105105 if (level.enabledFeatures().contains(FeatureFlags.REDSTONE_EXPERIMENTS)) {
106106 if (this.orientation == null) {
107- @@ -160 ,6 +161 ,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
107+ @@ -162 ,6 +163 ,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
108108 }
109109
110110 NeighborUpdater.executeUpdate(level, state, neighborPos, this.sourceBlock, orientation, false, this.sourcePos); // Paper - Add source block to BlockPhysicsEvent
111111+ } // Folia - block updates in unloaded chunks
112112 if (this.idx < NeighborUpdater.UPDATE_ORDER.length && NeighborUpdater.UPDATE_ORDER[this.idx] == this.skipDirection) {
113113 this.idx++;
114114 }
115- @@ -189 ,7 +191 ,9 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
115+ @@ -191 ,7 +193 ,9 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
116116 ) implements CollectingNeighborUpdater.NeighborUpdates {
117117 @Override
118118 public boolean runNext(final Level level) {
@@ -122,8 +122,8 @@ index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557ca
122122 return false;
123123 }
124124
125- @@ -202 ,8 +206 ,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
126- record SimpleNeighborUpdate(BlockPos pos, Block block, @Nullable Orientation orientation) implements CollectingNeighborUpdater.NeighborUpdates {
125+ @@ -204 ,8 +208 ,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
126+ private record SimpleNeighborUpdate(BlockPos pos, Block block, @Nullable Orientation orientation) implements CollectingNeighborUpdater.NeighborUpdates {
127127 @Override
128128 public boolean runNext(final Level level) {
129129- BlockState state = level.getBlockState(this.pos);
0 commit comments