diff --git a/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java b/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java index 0cb3afe4b..99f596708 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java +++ b/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java @@ -7,6 +7,7 @@ import com.google.common.collect.Maps; import com.troblecodings.core.NBTWrapper; +import com.troblecodings.signals.OpenSignalsMain; import com.troblecodings.signals.blocks.Signal; import com.troblecodings.signals.core.BlockPosSignalHolder; import com.troblecodings.signals.core.StateInfo; @@ -169,7 +170,16 @@ protected void setSignals(final SignalStateInfo lastSignal) { public void compact(final Point point) { super.compact(point); if (pathwayToBlock != null) { - pathwayToBlock.loadTileAndExecute(tile -> pathwayToReset = this); + pathwayToBlock.loadTileAndExecute(tile -> { + final InterSignalBoxPathway pw = (InterSignalBoxPathway) tile.getSignalBoxGrid() + .getPathwayByLastPoint(pathwayToBlock.getLastPoint()); + if (pw == null) { + OpenSignalsMain.getLogger() + .error("PW to block is zero! This should't be the case!"); + return; + } + pw.setOtherPathwayToReset(this); + }); } }