From 9eea45cf3a9604e28307978290e024ee515da178 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 4 Nov 2023 14:03:39 +0100 Subject: [PATCH] added DebugOutput for problems with SignalBoxPathway --- .../com/troblecodings/signals/signalbox/PathwayHolder.java | 3 +++ .../com/troblecodings/signals/signalbox/SignalBoxPathway.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/com/troblecodings/signals/signalbox/PathwayHolder.java b/src/main/java/com/troblecodings/signals/signalbox/PathwayHolder.java index fdb342034..493912aef 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/PathwayHolder.java +++ b/src/main/java/com/troblecodings/signals/signalbox/PathwayHolder.java @@ -65,6 +65,9 @@ public boolean requestWay(final Point p1, final Point p2, this.onWayAdd(way); updateToNet(way); }); + System.out.println( + "Requested Pathway from [" + p1 + "] to [" + p2 + "]! Printing StackTrace..."); + System.out.println(Thread.currentThread().getStackTrace()); return ways.isPresent(); } diff --git a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxPathway.java b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxPathway.java index ab521f56e..6476dc0aa 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxPathway.java +++ b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxPathway.java @@ -227,6 +227,9 @@ public void setPathStatus(final EnumPathUsage status, final @Nullable Point poin !status.equals(EnumPathUsage.FREE))); option.setEntry(PathEntryType.PATHUSAGE, status); }, point); + System.out.println( + "Setting PathStatus [" + status + "] on [" + this + "]! Printing StackTrace..."); + System.out.println(Thread.currentThread().getStackTrace()); } public void setPathStatus(final EnumPathUsage status) { @@ -388,6 +391,7 @@ public boolean tryBlock(final BlockPos position) { resetFirstSignal(); this.setPathStatus(EnumPathUsage.BLOCKED); isBlocked = true; + System.out.println("Blocked Pathway [" + this + "]!"); return true; }