diff --git a/src/main/java/noppes/npcs/client/gui/GuiMagicCycleMap.java b/src/main/java/noppes/npcs/client/gui/GuiMagicCycleMap.java index 814157302..006b30000 100644 --- a/src/main/java/noppes/npcs/client/gui/GuiMagicCycleMap.java +++ b/src/main/java/noppes/npcs/client/gui/GuiMagicCycleMap.java @@ -54,6 +54,7 @@ public class GuiMagicCycleMap extends GuiDiagram { // Use the cycle's layout if set; otherwise default to CIRCULAR_MANUAL. setLayout(cycle.layout != null ? cycle.layout : EnumDiagramLayout.CIRCULAR_MANUAL); + setLayout(EnumDiagramLayout.CIRCULAR_MANUAL); setCurvedArrows(true); setCurveAngle(-20); invalidateCache(); diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiDiagram.java b/src/main/java/noppes/npcs/client/gui/util/GuiDiagram.java index 03a49df18..69a9a264a 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiDiagram.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiDiagram.java @@ -20,11 +20,6 @@ import java.util.*; * This revised version ensures that non‑Chart layouts use the full diagram bounds for positioning * and that curved arrow drawing selects the best control point (using both curveAngle and its negative) * to avoid icons. - * - * Changes for separate two‑way connections (when allowTwoWay is false): - * - When a reverse connection is found, the line is drawn with a slight perpendicular offset. - * - The hit detection uses the same offset endpoints. - * - Arrow head placement is adjusted to match the offset. */ public abstract class GuiDiagram extends Gui { @@ -658,10 +653,8 @@ public abstract class GuiDiagram extends Gui { */ protected void drawConnectionLine(int x1, int y1, int x2, int y2, DiagramConnection conn, boolean dim) { DiagramConnection reverse = getConnectionByIds(conn.idTo, conn.idFrom); - if (allowTwoWay && reverse != null) { - DiagramIcon iconFrom = getIconById(conn.idFrom); - DiagramIcon iconTo = getIconById(conn.idTo); - if (iconFrom != null && iconTo != null && iconFrom.index > iconTo.index) { + if (!allowTwoWay && reverse != null) { + if (x1 > x2 || (x1 == x2 && y1 > y2)) { return; } } @@ -853,12 +846,8 @@ public abstract class GuiDiagram extends Gui { // Fixed drawArrowHead: protected void drawArrowHead(int x1, int y1, int x2, int y2, DiagramConnection conn, boolean dim) { DiagramConnection reverse = getConnectionByIds(conn.idFrom, conn.idTo); - // For merging two-way connections (when allowTwoWay is true), - // decide which arrow head to draw using the associated icon's index. - if (allowTwoWay && reverse != null) { - DiagramIcon iconFrom = getIconById(conn.idFrom); - DiagramIcon iconTo = getIconById(conn.idTo); - if (iconFrom != null && iconTo != null && iconFrom.index > iconTo.index) { + if (!allowTwoWay && reverse != null) { + if (x1 > x2 || (x1 == x2 && y1 > y2)) { return; } }