diff options
author | Albi <12825442+Flanisch@users.noreply.github.com> | 2022-08-15 21:27:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 21:27:24 +0200 |
commit | 43c014a8db9ad4d44c19190718835a7596dc0a2d (patch) | |
tree | 173ca882874af36bde55889ae585dc9111825184 /src/main/java/gregtech/common | |
parent | ed8fb594433346dfd37235c0604851436e0980df (diff) | |
download | GT5-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')
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/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -1,6 +1,5 @@ package gregtech.common.gui; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -16,7 +15,11 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi public String mNEI; String mName = ""; - private final int textColor = GuiColors.fusionReactor.getColor(); + + private final int + textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF), + textColorValue = this.getTextColorOrDefault("value", 0xFF0000); public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI) { super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); @@ -26,29 +29,29 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(mName, 8, -10, 16448255); + fontRendererObj.drawString(mName, 8, -10, textColorTitle); if (mContainer != null) { if ((mContainer.mDisplayErrorCode & 64) != 0) - fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255); + fontRendererObj.drawString("Incomplete Structure.", 10, 8, textColor); if (mContainer.mDisplayErrorCode == 0) { if (mContainer.mActive == 0) { - fontRendererObj.drawString("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); + fontRendererObj.drawString("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.", -70, 170, textColor); } else { - fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255); + fontRendererObj.drawString("Running perfectly.", 10, 170, textColor); } } if(this.mContainer.mEnergy > 160000000 && this.mContainer.mEnergy < 160010000) - fontRendererObj.drawString("160,000,000 EU", 50, 155, textColor); + fontRendererObj.drawString("160,000,000 EU", 50, 155, textColorValue); else if(this.mContainer.mEnergy > 320000000 && this.mContainer.mEnergy < 320010000) - fontRendererObj.drawString("320,000,000 EU", 50, 155, textColor); + fontRendererObj.drawString("320,000,000 EU", 50, 155, textColorValue); else if(this.mContainer.mEnergy > 640000000 && this.mContainer.mEnergy < 640010000) - fontRendererObj.drawString("640,000,000 EU", 50, 155, textColor); + fontRendererObj.drawString("640,000,000 EU", 50, 155, textColorValue); else if(this.mContainer.mEnergyLong > 5120000000L && this.mContainer.mEnergyLong < 5120080000L) - fontRendererObj.drawString("5,120,000,000 EU", 50, 155, textColor); + fontRendererObj.drawString("5,120,000,000 EU", 50, 155, textColorValue); else - fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergyLong) + " EU", 50, 155, textColor); + fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergyLong) + " EU", 50, 155, textColorValue); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java index 18909b7013..9b0de5ba81 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java @@ -2,7 +2,6 @@ package gregtech.common.gui; import forestry.api.apiculture.*; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.gui.widgets.GT_GuiSlotTooltip; import gregtech.api.gui.widgets.GT_GuiTooltip; @@ -19,7 +18,6 @@ import java.util.Arrays; public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Machine { - private static final String BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", @@ -32,9 +30,12 @@ public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Ma INFO_TOOLTIP = "GT5U.machines.industrialapiary.info.tooltip", INFO_WITH_BEE_TOOLTIP = "GT5U.machines.industrialapiary.infoextended.tooltip", UPGRADE_TOOLTIP = "GT5U.machines.industrialapiary.upgradeslot.tooltip" - ; + ; - private final int textColor = GuiColors.industrialApiary.getColor(); + private final int + textColor = this.getTextColorOrDefault("text", 0x404040), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0x404040); GT_GuiTooltip mErrorStatesTooltip; GT_GuiTooltip mSpeedToggleTooltip; @@ -117,9 +118,9 @@ public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Ma @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString("Ind. Apiary", 8, 4, textColor); + this.fontRendererObj.drawString("Ind. Apiary", 8, 4, textColorTitle); this.fontRendererObj.drawString("x", 30, 63, textColor); - this.fontRendererObj.drawString((1 << getContainer().mSpeed) + "", 26, 72, textColor); + this.fontRendererObj.drawString((1 << getContainer().mSpeed) + "", 26, 72, textColorValue); } @Override diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java index d75ea5c9ec..9421441f22 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java @@ -1,6 +1,5 @@ package gregtech.common.gui; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; @@ -10,7 +9,9 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_MicrowaveEnergyTransmitter extends GT_GUIContainerMetaTile_Machine { - private final int textColor = GuiColors.microwaveEnergyTransmitter.getColor(); + private final int + textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); public GT_GUIContainer_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_MicrowaveEnergyTransmitter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); @@ -18,7 +19,7 @@ public class GT_GUIContainer_MicrowaveEnergyTransmitter extends GT_GUIContainerM @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255); + this.fontRendererObj.drawString("Teleporter", 46, 8, textColorTitle); if (this.mContainer != null) { this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetX), 46, 16, textColor); this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetY), 46, 24, textColor); diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java index 33bac13be6..789e11e6f1 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java @@ -5,7 +5,6 @@ import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; import cpw.mods.fml.common.Optional; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.net.GT_Packet_SetLockedFluid; @@ -26,12 +25,9 @@ public class GT_GUIContainer_OutputHatch extends GT_GUIContainerMetaTile_Machine private final String mName; private final int - textColorTitle = GuiColors.outputHatchTitle.getColor(), - textColorInventory = GuiColors.outputHatchInventory.getColor(), - textColorAmount = GuiColors.outputHatchAmount.getColor(), - textColorAmountValue = GuiColors.outputHatchValue.getColor(), - textColorFluidName = GuiColors.outputHatchFluidName.getColor(), - textColorLockedFluid = GuiColors.outputHatchLockedFluid.getColor(); + textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); public GT_GUIContainer_OutputHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super(new GT_Container_OutputHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "OutputHatch.png"); @@ -40,15 +36,15 @@ public class GT_GUIContainer_OutputHatch extends GT_GUIContainerMetaTile_Machine @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorInventory); + fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { - fontRendererObj.drawString("Liquid Amount", 10, 20, textColorAmount); - fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_OutputHatch) mContainer).mContent), 10, 30, textColorAmountValue); - fontRendererObj.drawString("Locked Fluid", 101, 20, textColorAmount); + fontRendererObj.drawString("Liquid Amount", 10, 20, textColor); + fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_OutputHatch) mContainer).mContent), 10, 30, textColorValue); + fontRendererObj.drawString("Locked Fluid", 101, 20, textColor); ItemStack tLockedDisplayStack = (ItemStack) mContainer.getInventory().get(3); String fluidName = tLockedDisplayStack == null ? "None" : tLockedDisplayStack.getDisplayName(); - fontRendererObj.drawString(fluidName, 101, 30, textColorFluidName); + fontRendererObj.drawString(fluidName, 101, 30, textColorValue); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java index dfd1e61aa9..eff12be29a 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java @@ -1,6 +1,5 @@ package gregtech.common.gui; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; @@ -18,7 +17,7 @@ public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTi GT_GuiIcon.TAB_NORMAL_BRICK, GT_GuiIcon.TAB_HIGHLIGHT_BRICK, GT_GuiIcon.TAB_DISABLED_BRICK); - private final int textColor = GuiColors.primitiveBlastFurnace.getColor(); + private final int textColor = this.getTextColorOrDefault("title", 0x404040); public GT_GUIContainer_PrimitiveBlastFurnace(InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity, String name, String aNEI) { diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java index 370c71fed9..51086d3cfd 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java @@ -1,6 +1,5 @@ package gregtech.common.gui; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; @@ -12,9 +11,10 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_QuantumChest extends GT_GUIContainerMetaTile_Machine { private final String mName; - private final int - textColorTitle = GuiColors.quantumChestTitle.getColor(), - textColorAmount = GuiColors.quantumChestAmount.getColor(); + private final int + textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); public GT_GUIContainer_QuantumChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { @@ -27,8 +27,8 @@ public class GT_GUIContainer_QuantumChest extends GT_GUIContainerMetaTile_Machin fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { - fontRendererObj.drawString("Item Amount", 10, 20, textColorAmount); - fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_QuantumChest) mContainer).mContent), 10, 30, textColorAmount); + fontRendererObj.drawString("Item Amount", 10, 20, textColor); + fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_QuantumChest) mContainer).mContent), 10, 30, textColorValue); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java index 09fb48121e..6a02fc8bca 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.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_Regulator extends GT_GUIContainerMetaTile_Machine { - private final int textColor = GuiColors.regulator.getColor(); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF); public GT_GUIContainer_Regulator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Regulator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/Regulator.png"); diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java index efc4771b22..3d6aa6f966 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java @@ -1,6 +1,5 @@ package gregtech.common.gui; -import gregtech.api.enums.GuiColors; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; @@ -10,7 +9,9 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_Teleporter extends GT_GUIContainerMetaTile_Machine { - private final int textColor = GuiColors.teleporter.getColor(); + private final int + textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("text", 0xFAFAFF); public GT_GUIContainer_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Teleporter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); @@ -18,7 +19,7 @@ public class GT_GUIContainer_Teleporter extends GT_GUIContainerMetaTile_Machine @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255); + this.fontRendererObj.drawString("Teleporter", 46, 8, textColorTitle); if (this.mContainer != null) { this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetX), 46, 16, textColor); this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetY), 46, 24, textColor); diff --git a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java index 76a475a1a5..c4e23eab6e 100644 --- a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java @@ -1,7 +1,6 @@ package gregtech.common.render; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GuiColors; import gregtech.api.enums.ItemList; import gregtech.common.items.GT_FluidDisplayItem; import net.minecraft.client.Minecraft; @@ -17,8 +16,6 @@ import org.lwjgl.opengl.GL11; @SideOnly(cpw.mods.fml.relauncher.Side.CLIENT) public class GT_FluidDisplayStackRenderer implements IItemRenderer { - private final GuiColors textColor = GuiColors.fluidDisplayStackRenderer; - public GT_FluidDisplayStackRenderer() { MinecraftForgeClient.registerItemRenderer(ItemList.Display_Fluid.getItem(), this); } @@ -92,7 +89,7 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { GL11.glDisable(GL11.GL_BLEND); GL11.glScalef(smallTextScale, smallTextScale, 1.0f); - fontRender.drawString( amountString, 0, (int) (16/smallTextScale) - fontRender.FONT_HEIGHT + 1, textColor.getColor(), true); + fontRender.drawString( amountString, 0, (int) (16/smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); GL11.glScalef(1f, 1f, 1f); GL11.glDisable(GL11.GL_ALPHA_TEST); } diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java index e385bd7686..5128af1c36 100644 --- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java +++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java @@ -7,7 +7,6 @@ import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; -import gregtech.api.enums.GuiColors; import gregtech.common.entities.GT_EntityFXPollution; import gregtech.common.misc.GT_ClientPollutionMap; import net.minecraft.block.Block; @@ -47,8 +46,6 @@ public class GT_PollutionRenderer { private static final short[] liquidColor = {160, 200, 10}; private static final short[] foliageColor = {160, 80, 15}; - private final GuiColors textColor = GuiColors.pollutionRenderer; - //TODO need to soft update some blocks, grass and leaves does more often than liquid it looks like. public GT_PollutionRenderer() { @@ -248,7 +245,7 @@ public class GT_PollutionRenderer { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); - Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(text, 0, off, textColor.getColor()); + Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(text, 0, off, 0xFFFFFFFF); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); } |