diff --git a/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java b/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java index d49b68d8a..0cb3afe4b 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java +++ b/src/main/java/com/troblecodings/signals/signalbox/InterSignalBoxPathway.java @@ -152,18 +152,27 @@ protected SignalStateInfo getLastSignalInfo() { @Override protected void setSignals(final SignalStateInfo lastSignal) { - if (tile == null || isExecutingSignalSet) - return; - final StateInfo identifier = new StateInfo(tile.getWorld(), tile.getPos()); - if (lastSignal != null && pathwayToReset != null) { - final Signal signal = SignalBoxHandler.getSignal(identifier, lastSignal.pos); - if (signal == null) - return; - pathwayToReset.setSignals(new SignalStateInfo(tile.getWorld(), lastSignal.pos, signal)); + if (pathwayToReset != null && lastSignal != null) { + if (tile != null) { + final StateInfo identifier = new StateInfo(tile.getWorld(), tile.getPos()); + final Signal signal = SignalBoxHandler.getSignal(identifier, lastSignal.pos); + if (signal != null) { + pathwayToReset.setSignals( + new SignalStateInfo(tile.getWorld(), lastSignal.pos, signal)); + } + } } super.setSignals(lastSignal); } + @Override + public void compact(final Point point) { + super.compact(point); + if (pathwayToBlock != null) { + pathwayToBlock.loadTileAndExecute(tile -> pathwayToReset = this); + } + } + @Override public void resetPathway(final Point point) { super.resetPathway(point); diff --git a/src/main/java/com/troblecodings/signals/signalbox/PathwayData.java b/src/main/java/com/troblecodings/signals/signalbox/PathwayData.java index 3224e0600..824e7072a 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/PathwayData.java +++ b/src/main/java/com/troblecodings/signals/signalbox/PathwayData.java @@ -424,12 +424,11 @@ public void read(final NBTWrapper tag) { nodeBuilder.add(node); }); this.listOfNodes = nodeBuilder.build(); + this.type = PathType.valueOf(tag.getString(PATH_TYPE)); + this.initalize(); if (!checkForProtectionWay()) { this.emptyOrBroken = true; - return; } - this.type = PathType.valueOf(tag.getString(PATH_TYPE)); - this.initalize(); } private SignalBoxNode getNodeFromNBT(final NBTWrapper nodeNBT) {