aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/GT_Mod.java
diff options
context:
space:
mode:
authorAlbi <12825442+Flanisch@users.noreply.github.com>2022-08-12 20:34:37 +0200
committerGitHub <noreply@github.com>2022-08-12 20:34:37 +0200
commitbbd40c34e104dcead78290af1394e6f5867df565 (patch)
tree43c8d507722b7ba189cf4acfb924ca584b287c6f /src/main/java/gregtech/GT_Mod.java
parentd815f1f0e7b267c1c7ef97fdf2c790b6c9f6a378 (diff)
downloadGT5-Unofficial-bbd40c34e104dcead78290af1394e6f5867df565.tar.gz
GT5-Unofficial-bbd40c34e104dcead78290af1394e6f5867df565.tar.bz2
GT5-Unofficial-bbd40c34e104dcead78290af1394e6f5867df565.zip
Added means of customizing GUI colors for resource packs (#1203)
* Added means of customizing GUI colors through lang file * Color values are now stored in json file instead of the lang file * Made json only load upon resource reload and ensured server compatibility Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/GT_Mod.java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index e68285472c..72deff5953 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -16,6 +16,7 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gregtech.api.enchants.Enchantment_EnderDamage;
import gregtech.api.enchants.Enchantment_Radioactivity;
@@ -63,26 +64,9 @@ import gregtech.loaders.load.GT_SonictronLoader;
import gregtech.loaders.misc.GT_Achievements;
import gregtech.loaders.misc.GT_Bees;
import gregtech.loaders.misc.GT_CoverLoader;
-import gregtech.loaders.postload.GT_BlockResistanceLoader;
-import gregtech.loaders.postload.GT_BookAndLootLoader;
-import gregtech.loaders.postload.GT_CraftingRecipeLoader;
-import gregtech.loaders.postload.GT_CropLoader;
-import gregtech.loaders.postload.GT_ExtremeDieselFuelLoader;
-import gregtech.loaders.postload.GT_ItemMaxStacksizeLoader;
-import gregtech.loaders.postload.GT_MachineRecipeLoader;
-import gregtech.loaders.postload.GT_MinableRegistrator;
-import gregtech.loaders.postload.GT_PostLoad;
-import gregtech.loaders.postload.GT_RecyclerBlacklistLoader;
-import gregtech.loaders.postload.GT_ScrapboxDropLoader;
-import gregtech.loaders.postload.GT_Worldgenloader;
-import gregtech.loaders.preload.GT_Loader_CircuitBehaviors;
-import gregtech.loaders.preload.GT_Loader_ItemData;
-import gregtech.loaders.preload.GT_Loader_Item_Block_And_Fluid;
-import gregtech.loaders.preload.GT_Loader_MetaTileEntities;
-import gregtech.loaders.preload.GT_Loader_MultiTileEntities;
-import gregtech.loaders.preload.GT_Loader_OreDictionary;
-import gregtech.loaders.preload.GT_Loader_OreProcessing;
-import gregtech.loaders.preload.GT_PreLoad;
+import gregtech.loaders.misc.GT_JsonLoader;
+import gregtech.loaders.postload.*;
+import gregtech.loaders.preload.*;
import gregtech.nei.IMCForNEI;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeOutput;
@@ -172,6 +156,8 @@ public class GT_Mod implements IGT_Mod {
public static final String aTextIC2 = "ic2_";
public static final Logger GT_FML_LOGGER = LogManager.getLogger("GregTech GTNH");
+ @SideOnly(Side.CLIENT)
+ public static GT_JsonLoader jsonGuiColors;
static {
if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) || (509 != GT_RecipeRegistrator.VERSION) || (509 != Element.VERSION) || (509 != Materials.VERSION) || (509 != OrePrefixes.VERSION)) {
@@ -219,6 +205,7 @@ public class GT_Mod implements IGT_Mod {
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
MinecraftForge.EVENT_BUS.register(new ExtraIcons());
+ jsonGuiColors = new GT_JsonLoader("textures/guiColors.json");
}
Configuration tMainConfig = GT_PreLoad.getConfiguration(aEvent.getModConfigurationDirectory());
@@ -478,7 +465,7 @@ public class GT_Mod implements IGT_Mod {
GT_PostLoad.identifyAnySteam();
achievements = new GT_Achievements();
-
+
ReverseShapedRecipe.runReverseRecipes();
ReverseShapelessRecipe.runReverseRecipes();