diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterface.java b/src/main/java/appeng/client/gui/implementations/GuiInterface.java index 8ba98460e..13ce93bd7 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterface.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterface.java @@ -38,6 +38,7 @@ import appeng.client.gui.widgets.GuiSimpleImgButton; import appeng.client.gui.widgets.GuiTabButton; import appeng.client.gui.widgets.GuiToggleButton; import appeng.container.implementations.ContainerInterface; +import appeng.core.AEConfig; import appeng.core.AELog; import appeng.core.localization.ButtonToolTips; import appeng.core.localization.ColorUtils; @@ -246,12 +247,14 @@ public class GuiInterface extends GuiUpgradeable { } } - // highlight pattern slots with unsupported stack types - for (final Object obj : this.cvb.inventorySlots) { - if (obj instanceof Slot slot && hasInvalidTypeStack(slot.getStack())) { - final int sx = offsetX + slot.xDisplayPosition; - final int sy = offsetY + slot.yDisplayPosition; - drawRect(sx, sy, sx + 16, sy + 16, ColorUtils.itemSlotOverlayFluidMismatch.getColor()); + if (AEConfig.instance.highlightPatternTypeMismatchInGUI) { + // highlight pattern slots with unsupported stack types + for (final Object obj : this.cvb.inventorySlots) { + if (obj instanceof Slot slot && hasInvalidTypeStack(slot.getStack())) { + final int sx = offsetX + slot.xDisplayPosition; + final int sy = offsetY + slot.yDisplayPosition; + drawRect(sx, sy, sx + 16, sy + 16, ColorUtils.itemSlotOverlayFluidMismatch.getColor()); + } } } } @@ -261,8 +264,7 @@ public class GuiInterface extends GuiUpgradeable { final NBTTagCompound nbt = stack.getTagCompound(); if (nbt.getBoolean("InvalidPattern")) return false; IAEStackType[] supportedTypes = ((ContainerInterface) this.cvb).getSupportedStackTypes(); - return hasInvalidTypeInTagList(nbt.getTagList("in", NBT.TAG_COMPOUND), supportedTypes) - || hasInvalidTypeInTagList(nbt.getTagList("out", NBT.TAG_COMPOUND), supportedTypes); + return hasInvalidTypeInTagList(nbt.getTagList("in", NBT.TAG_COMPOUND), supportedTypes); } private static boolean hasInvalidTypeInTagList(final NBTTagList tagList, IAEStackType[] supportedTypes) { diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java index 2b6eaf809..368d0b115 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java @@ -953,7 +953,8 @@ public class GuiInterfaceTerminal extends AEBaseGui } else if (entry.filteredRecipes[slotIdx]) { GL11.glTranslatef(0.0f, 0.0f, ITEM_STACK_OVERLAY_Z); drawRect(0, 0, 16, 16, ColorUtils.itemSlotOverlayUnpowered.getColor()); - } else if (hasInvalidTypeStack(stack, entry.supportedStackTypes)) { + } else if (AEConfig.instance.highlightPatternTypeMismatchInGUI + && hasInvalidTypeStack(stack, entry.supportedStackTypes)) { GL11.glTranslatef(0.0f, 0.0f, SLOT_Z - ITEM_STACK_OVERLAY_Z); drawRect(0, 0, 16, 16, ColorUtils.itemSlotOverlayFluidMismatch.getColor()); } @@ -1371,8 +1372,7 @@ public class GuiInterfaceTerminal extends AEBaseGui if (stack == null || stack.getTagCompound() == null) return false; final NBTTagCompound nbt = stack.getTagCompound(); if (nbt.getBoolean("InvalidPattern")) return false; - return hasInvalidTypeInTagList(nbt.getTagList("in", NBT.TAG_COMPOUND), supportedTypes) - || hasInvalidTypeInTagList(nbt.getTagList("out", NBT.TAG_COMPOUND), supportedTypes); + return hasInvalidTypeInTagList(nbt.getTagList("in", NBT.TAG_COMPOUND), supportedTypes); } private static boolean hasInvalidTypeInTagList(final NBTTagList tagList, final IAEStackType[] supportedTypes) { diff --git a/src/main/java/appeng/core/AEConfig.java b/src/main/java/appeng/core/AEConfig.java index ab530f7d7..c595b7184 100644 --- a/src/main/java/appeng/core/AEConfig.java +++ b/src/main/java/appeng/core/AEConfig.java @@ -95,6 +95,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject public int MEMonitorableSmallSize = 6; public int InterfaceTerminalSmallSize = 6; public boolean highlightWhenSomethingStuckInInterface = true; + public boolean highlightPatternTypeMismatchInGUI = true; public int screenColor = 0xFFFFFF; /** Max rows for crafting pins section (1-16). Caps the cycle button options. */ @@ -392,6 +393,10 @@ public final class AEConfig extends Configuration implements IConfigurableObject .getBoolean(true); this.highlightWhenSomethingStuckInInterface = this.get("Client", "highlightWhenSomethingStuckInInterface", true) .getBoolean(true); + final Property highlightPatternTypeMismatchInGUI = this + .get("Client", "highlightPatternTypeMismatchInGUI", true); + highlightPatternTypeMismatchInGUI.comment = "Highlight pattern slots in red when the pattern uses unsupported stack types."; + this.highlightPatternTypeMismatchInGUI = highlightPatternTypeMismatchInGUI.getBoolean(true); this.MEMonitorableSmallSize = this.get("Client", "MEMonitorableSmallSize", 6).getInt(6); this.InterfaceTerminalSmallSize = this.get("Client", "InterfaceTerminalSmallSize", 6).getInt(6); Property screenColorProperty = this.get("Client", "screenColor", this.screenColor);