diff --git a/src/main/java/com/troblecodings/signals/guis/GuiSignalBox.java b/src/main/java/com/troblecodings/signals/guis/GuiSignalBox.java index 92a2c9f1c..bee5e19d3 100644 --- a/src/main/java/com/troblecodings/signals/guis/GuiSignalBox.java +++ b/src/main/java/com/troblecodings/signals/guis/GuiSignalBox.java @@ -443,7 +443,7 @@ private void setupModeSettings(final UIEntity parent, final EnumGuiMode mode, return point.toShortString(); })); parent.add(GuiElements.createEnumElement(integerable, e -> { - final Point point = validInConnections.get(e); + final Point point = e >= 0 ? validInConnections.get(e) : null; if (point == null) { option.removeEntry(PathEntryType.POINT); removeEntryFromServer(node, mode, rotation, PathEntryType.POINT); @@ -467,7 +467,7 @@ private void setupModeSettings(final UIEntity parent, final EnumGuiMode mode, return point.toShortString(); })); parent.add(GuiElements.createEnumElement(integerable, e -> { - final Point point = validEnds.get(e); + final Point point = e >= 0 ? validEnds.get(e) : null; if (point == null) { option.removeEntry(PathEntryType.POINT); removeEntryFromServer(node, mode, rotation, PathEntryType.POINT);