diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 01ef1f9a..1b8c9892 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -49,20 +49,14 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import org.apache.commons.lang3.StringUtils; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintStream; +import java.io.*; import java.util.*; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang3.StringUtils; - @Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") public class GT_Mod implements IGT_Mod { public static final int VERSION = 509; @@ -244,6 +238,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true); gregtechproxy.mMagneticraftBonusOutputPercent = tMainConfig.get(aTextGeneral, "MagneticraftBonusOutputPercent", 100.0f).getDouble(); gregtechproxy.mTEMachineRecipes = tMainConfig.get("general", "TEMachineRecipes", false).getBoolean(false); + gregtechproxy.mEnableAllMaterials = tMainConfig.get("general", "EnableAllMaterials", false).getBoolean(false); + gregtechproxy.mEnableAllComponents = tMainConfig.get("general", "EnableAllComponents", false).getBoolean(false); gregtechproxy.mPollution = tMainConfig.get("Pollution", "EnablePollution", true).getBoolean(true); gregtechproxy.mPollutionSmogLimit = tMainConfig.get("Pollution", "SmogLimit", 500000).getInt(500000); gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", 750000).getInt(750000); diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 433eea79..47a59baf 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -1275,14 +1275,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static void init() { new ProcessingConfig(); - new ProcessingModSupport(); + if (!GT_Mod.gregtechproxy.mEnableAllMaterials) new ProcessingModSupport(); for (IMaterialHandler aRegistrator : mMaterialHandlers) { aRegistrator.onMaterialsInit(); //This is where addon mods can add/manipulate materials } initMaterialProperties(); //No more material addition or manipulation should be done past this point! MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[MATERIALS_MAP.size()]); //Generate standard object array. This is a lot faster to loop over. VALUES = Arrays.asList(MATERIALS_ARRAY); - OrePrefixes.initMaterialComponents(); + if (!GT_Mod.gregtechproxy.mEnableAllComponents) OrePrefixes.initMaterialComponents(); for (Materials aMaterial : MATERIALS_ARRAY) { if (aMaterial.mMetaItemSubID >= 0) { if (aMaterial.mMetaItemSubID < 1000) { diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 524a1343..972e04c8 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -179,6 +179,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { private final String aTextForestry = "Forestry"; private final String aTextArsmagica2 = "arsmagica2"; public boolean mTEMachineRecipes = false; + public boolean mEnableAllMaterials = false; + public boolean mEnableAllComponents = false; public GT_Proxy() { GameRegistry.registerFuelHandler(this);