aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorAlbi <12825442+Flanisch@users.noreply.github.com>2022-08-15 21:27:24 +0200
committerGitHub <noreply@github.com>2022-08-15 21:27:24 +0200
commit43c014a8db9ad4d44c19190718835a7596dc0a2d (patch)
tree173ca882874af36bde55889ae585dc9111825184 /src/main/java/gregtech/common
parented8fb594433346dfd37235c0604851436e0980df (diff)
downloadGT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.tar.gz
GT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.tar.bz2
GT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.zip
Overriding GUI colors with .mcmeta (#1261)
* Implemented gui textcolor override with .mcmeta files * cleanup * Added shared class to reduce code duplication * Moved #drawLine back to GT_NEI_DefaultHandler
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java10
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java7
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java11
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java3
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java3
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java3
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java25
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java13
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java7
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java20
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java3
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java12
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java3
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java7
-rw-r--r--src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java5
-rw-r--r--src/main/java/gregtech/common/render/GT_PollutionRenderer.java5
30 files changed, 81 insertions, 104 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index 0d2a76731b..f849da7594 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -27,6 +27,8 @@ import gregtech.api.interfaces.tileentity.ITurnable;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
import gregtech.api.net.GT_Packet_ClientPreference;
import gregtech.api.objects.GT_ItemStack;
+import gregtech.api.util.ColorsMetadataSection;
+import gregtech.api.util.ColorsMetadataSectionSerializer;
import gregtech.api.util.GT_ClientPreference;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_PlayedSound;
@@ -39,7 +41,6 @@ import gregtech.common.entities.GT_Entity_Arrow_Potion;
import gregtech.common.net.MessageUpdateFluidDisplayItem;
import gregtech.common.render.*;
import gregtech.loaders.ExtraIcons;
-import gregtech.loaders.misc.GT_JsonLoader;
import gregtech.loaders.preload.GT_PreLoad;
import ic2.api.tile.IWrenchable;
import net.minecraft.block.Block;
@@ -401,10 +402,7 @@ public class GT_Client extends GT_Proxy
super.onPreLoad();
MinecraftForge.EVENT_BUS.register(new ExtraIcons());
- GT_Mod.jsonGuiColors = new GT_JsonLoader("textures/guiColors.json");
- for (GuiColors value : GuiColors.values()) {
- GT_Mod.jsonGuiColors.registerReloadListener(l -> value.reload(l::getString));
- }
+ Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class);
final String[] arr = {
"renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", "Goshen_Ithilien", "manf", "Bimgo", "leagris",
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index 8a33007caa..23802851c7 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
import gregtech.api.gui.widgets.GT_GuiIcon;
@@ -247,7 +246,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior {
private final int maxIntSlot, maxAdjSlot;
- private final int textColor = GuiColors.coverArm.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
index fce84264ee..dd2b17df05 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -162,7 +161,7 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverControlsWork.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index 2d9a59116b..9e0fd84a6c 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -161,7 +160,7 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverPlayerDetector.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
index b64ba83fe1..366b896d45 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -121,7 +120,7 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverDoesWork.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
index 0c99f8b4c8..1f59049828 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
@@ -2,7 +2,6 @@ package gregtech.common.covers;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -373,7 +372,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe
private final String INVERTED = GT_Utility.trans("INVERTED", "Inverted");
private final String NORMAL = GT_Utility.trans("NORMAL", "Normal");
- private final int textColor = GuiColors.coverEUMeter.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
index bfdc56c157..d35d0dbddd 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
@@ -265,6 +265,8 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
private static final int spaceX = 18;
private static final int spaceY = 18;
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
+
public GUI(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, aCoverVariable.mStack);
this.side = aSide;
@@ -280,10 +282,10 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
@Override
public void drawExtras(int mouseX, int mouseY, float parTicks) {
super.drawExtras(mouseX, mouseY, parTicks);
- this.fontRendererObj.drawString(GT_Utility.trans("128", "Redstone"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 0, 0xFF555555);
- this.fontRendererObj.drawString(GT_Utility.trans("129", "Energy"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 1, 0xFF555555);
- this.fontRendererObj.drawString(GT_Utility.trans("130", "Fluids"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 2, 0xFF555555);
- this.fontRendererObj.drawString(GT_Utility.trans("131", "Items"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 3, 0xFF555555);
+ this.fontRendererObj.drawString(GT_Utility.trans("128", "Redstone"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 0, textColor);
+ this.fontRendererObj.drawString(GT_Utility.trans("129", "Energy"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 1, textColor);
+ this.fontRendererObj.drawString(GT_Utility.trans("130", "Fluids"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 2, textColor);
+ this.fontRendererObj.drawString(GT_Utility.trans("131", "Items"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 3, textColor);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
index cff6c2dd7e..4536cef710 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
@@ -177,7 +177,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi
private final FluidLimiterData coverVariable;
private final GT_GuiIntegerTextBox thresholdBox;
-
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, FluidLimiterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
@@ -196,7 +196,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi
@Override
public void drawExtras(int mouseX, int mouseY, float parTicks) {
super.drawExtras(mouseX, mouseY, parTicks);
- this.getFontRenderer().drawString("Percent threshold", startX, startY + spaceY * 2 - 35, 0xFF555555);
+ this.getFontRenderer().drawString("Percent threshold", startX, startY + spaceY * 2 - 35, textColor);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
index c8828aa026..947635369a 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
@@ -2,7 +2,6 @@ package gregtech.common.covers;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -358,8 +357,8 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
private boolean warn = false;
private final int
- textColor = GuiColors.coverFluidRegulator.getColor(),
- textColorWarn = GuiColors.coverFluidRegulatorWarn.getColor();
+ textColor = this.getTextColorOrDefault("text", 0xFF555555),
+ textColorValue = this.getTextColorOrDefault("value", 0xFFFF0000);
public GUI(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
@@ -399,7 +398,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
this.getFontRenderer().drawString(GT_Utility.trans("229", "Conditional"), startX + spaceX * 4, 4 + startY + spaceY * 1, textColor);
this.getFontRenderer().drawString(GT_Utility.trans("208", " L"), startX + spaceX * 4, 4 + startY + spaceY * 2, textColor);
this.getFontRenderer().drawString(GT_Utility.trans("209", " ticks"), startX + spaceX * 7, 4 + startY + spaceY * 2, textColor);
- this.getFontRenderer().drawString(String.format(GT_Utility.trans("210", "Average: %.2f L/sec"), coverVariable.tickRate == 0 ? 0 : coverVariable.speed * 20d / coverVariable.tickRate), startX + spaceX * 0, 4 + startY + spaceY * 3, warn ? textColorWarn : textColor);
+ this.getFontRenderer().drawString(String.format(GT_Utility.trans("210", "Average: %.2f L/sec"), coverVariable.tickRate == 0 ? 0 : coverVariable.speed * 20d / coverVariable.tickRate), startX + spaceX * 0, 4 + startY + spaceY * 3, warn ? textColorValue : textColor);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
index 004d459bad..c90a0fb07e 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
@@ -2,7 +2,6 @@ package gregtech.common.covers;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
import gregtech.api.gui.widgets.GT_GuiIcon;
@@ -206,8 +205,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil
private static final int spaceY = 18;
private final int
- textColor = GuiColors.coverFluidFilter.getColor(),
- textColorFluidFilterName = GuiColors.coverFluidFilterName.getColor();
+ textColor = this.getTextColorOrDefault("text", 0xFF555555),
+ textColorTitle = this.getTextColorOrDefault("title", 0xFF222222);
public GT_FluidFilterGUICover(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
@@ -264,10 +263,10 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil
@Override
public void drawExtras(int mouseX, int mouseY, float parTicks) {
super.drawExtras(mouseX, mouseY, parTicks);
- this.fontRendererObj.drawString(GT_Utility.trans("238", "Filter Direction"), startX + spaceX*2, 3+startY+spaceY*0, textColor);
- this.fontRendererObj.drawString(GT_Utility.trans("239", "Filter Type"), startX + spaceX*2, 3+startY+spaceY*1, textColor);
+ this.fontRendererObj.drawString(GT_Utility.trans("238", "Filter Direction"), startX + spaceX*2, 3+startY+spaceY*0, textColor);
+ this.fontRendererObj.drawString(GT_Utility.trans("239", "Filter Type"), startX + spaceX*2, 3+startY+spaceY*1, textColor);
this.fontRendererObj.drawString(GT_Utility.trans("240", "Block Flow"), startX + spaceX*2, 3+startY+spaceY*2, textColor);
- this.fontRendererObj.drawSplitString(fluidFilterName, startX + spaceX+3, 4+startY+spaceY*3, gui_width-40 , textColorFluidFilterName);
+ this.fontRendererObj.drawSplitString(fluidFilterName, startX + spaceX+3, 4+startY+spaceY*3, gui_width-40 , textColorTitle);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
index ef13e7c0aa..f6b37316b2 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
@@ -3,7 +3,6 @@ package gregtech.common.covers;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.ByteBufUtils;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
import gregtech.api.gui.widgets.GT_GuiIcon;
@@ -220,7 +219,7 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverItemFilter.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index a157377315..846e115bd8 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -4,7 +4,6 @@ import com.google.common.io.ByteArrayDataInput;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
import gregtech.api.gui.widgets.GT_GuiIcon;
@@ -288,7 +287,7 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.
private final String INVERTED = GT_Utility.trans("INVERTED", "Inverted");
private final String NORMAL = GT_Utility.trans("NORMAL", "Normal");
- private final int textColor = GuiColors.coverItemMeter.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index 40a10ad28b..3d5074a686 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -2,7 +2,6 @@ package gregtech.common.covers;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconCheckButton;
@@ -232,7 +231,7 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe
private final String INVERTED = GT_Utility.trans("INVERTED", "Inverted");
private final String NORMAL = GT_Utility.trans("NORMAL", "Normal");
- private final int textColor = GuiColors.coverLiquidMeter.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
index e7b3f15c86..dc4dc7c56e 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconCheckButton;
@@ -207,7 +206,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverMaintenance.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
index 1ba0a97c50..4bcb119e84 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconCheckButton;
@@ -143,7 +142,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverPlayerDetector.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index ba71d7bd52..e92f3f1370 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconButton;
@@ -186,7 +185,7 @@ public class GT_Cover_Pump extends GT_CoverBehavior{
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverPump.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GT_PumpGUICover(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index 1f6f40a008..b60270ea58 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -2,7 +2,6 @@ package gregtech.common.covers;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconCheckButton;
@@ -160,7 +159,7 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverRedstoneWirelessBase.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index 06c31f7ffe..bf6ecc3a56 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -1,7 +1,6 @@
package gregtech.common.covers;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUICover;
import gregtech.api.gui.widgets.GT_GuiIcon;
import gregtech.api.gui.widgets.GT_GuiIconCheckButton;
@@ -127,7 +126,7 @@ public class GT_Cover_Shutter extends GT_CoverBehavior {
private static final int spaceX = 18;
private static final int spaceY = 18;
- private final int textColor = GuiColors.coverShutter.getColor();
+ private final int textColor = this.getTextColorOrDefault("text", 0xFF555555);
public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID));
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java
index 9d4b23975a..0c9b6e1f93 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java
@@ -1,13 +1,12 @@
package gregtech.common.gui;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
public class GT_GUIContainer_Boiler extends GT_GUIContainerMetaTile_Machine {
- private final int textColor = GuiColors.boiler.getColor();
+ private final int textColor = this.getTextColorOrDefault("title", 0x404040);
public GT_GUIContainer_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) {
super(new GT_Container_Boiler(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aTextureName);
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
index d18b61410f..6e51d85f32 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
@@ -1,13 +1,12 @@
package gregtech.common.gui;
-import gregtech.api.enums.GuiColors;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
public class GT_GUIContainer_BronzeBlastFurnace extends GT_GUIContainerMetaTile_Machine {
- private final int textColor = GuiColors.bronzeBlastFurnace.getColor();
+ private final int textColor = this.getTextColorOrDefault("title", 0x404040);
public GT_GUIContainer_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
super(new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BronzeBlastFurnace.png");
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java
index bb806b177f..b6a86fd668 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java
+++ b/