diff options
Diffstat (limited to 'src/main/java/gregtech/loaders/preload')
| -rw-r--r-- | src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java | 75 | ||||
| -rw-r--r-- | src/main/java/gregtech/loaders/preload/GT_PreLoad.java | 722 |
2 files changed, 246 insertions, 551 deletions
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index ce69a4fa27..fda6c4c9e8 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -31,7 +31,6 @@ import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -2061,59 +2060,33 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { GT_OreDictUnificator .set(OrePrefixes.ingot, Materials.Void, GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1L, 16)); - if (GregTech_API.sUnification - .get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateIron", true)) { - GT_OreDictUnificator - .set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 0)); - } else { - GT_OreDictUnificator.set( - OrePrefixes.plate, - Materials.Iron, - GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 0), - false, - false); - } + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Iron, + GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 0), + false, + false); - if (GregTech_API.sUnification - .get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateSteel", true)) { - GT_OreDictUnificator - .set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 1)); - } else { - GT_OreDictUnificator.set( - OrePrefixes.plate, - Materials.Steel, - GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 1), - false, - false); - } + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Steel, + GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 1), + false, + false); - if (GregTech_API.sUnification - .get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateTinAlloy", true)) { - GT_OreDictUnificator.set( - OrePrefixes.plate, - Materials.TinAlloy, - GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 2)); - } else { - GT_OreDictUnificator.set( - OrePrefixes.plate, - Materials.TinAlloy, - GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 2), - false, - false); - } + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.TinAlloy, + GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 2), + false, + false); - if (GregTech_API.sUnification - .get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateCopper", true)) { - GT_OreDictUnificator - .set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 3)); - } else { - GT_OreDictUnificator.set( - OrePrefixes.plate, - Materials.Copper, - GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 3), - false, - false); - } + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Copper, + GT_ModHandler.getModItem(Railcraft.ID, "part.plate", 1L, 3), + false, + false); GT_OreDictUnificator.set( OrePrefixes.dust, diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java index 26d75c7933..a2e6137cff 100644 --- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java @@ -2,7 +2,6 @@ package gregtech.loaders.preload; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.Mods.CraftTweaker; -import static gregtech.api.enums.Mods.EnderIO; import static gregtech.api.enums.Mods.GalacticraftCore; import static gregtech.api.enums.Mods.GregTech; @@ -14,7 +13,6 @@ import java.io.PrintStream; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; import java.util.List; import java.util.Objects; import java.util.regex.Matcher; @@ -35,7 +33,6 @@ import cpw.mods.fml.common.discovery.ASMDataTable; import cpw.mods.fml.common.discovery.ModDiscoverer; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -50,6 +47,16 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_RecipeBuilder; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; +import gregtech.common.config.client.ConfigColorModulation; +import gregtech.common.config.client.ConfigInterface; +import gregtech.common.config.client.ConfigRender; +import gregtech.common.config.client.ConfigWaila; +import gregtech.common.config.gregtech.ConfigDebug; +import gregtech.common.config.gregtech.ConfigFeatures; +import gregtech.common.config.gregtech.ConfigGeneral; +import gregtech.common.config.gregtech.ConfigMachines; +import gregtech.common.config.gregtech.ConfigOreDropBehavior; +import gregtech.common.config.gregtech.ConfigPollution; import gregtech.common.tileentities.machines.long_distance.GT_MetaTileEntity_LongDistancePipelineBase; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; @@ -126,33 +133,28 @@ public class GT_PreLoad { .addStringLocalization("Material." + aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName)); } - public static Configuration getConfiguration(File configDir) { - File tFile = new File(new File(configDir, "GregTech"), "GregTech.cfg"); - Configuration tMainConfig = new Configuration(tFile); - tMainConfig.load(); - tFile = new File(new File(configDir, "GregTech"), "IDs.cfg"); + public static void getConfiguration(File configDir) { + File tFile = new File(new File(configDir, "GregTech"), "IDs.cfg"); GT_Config.sConfigFileIDs = new Configuration(tFile); GT_Config.sConfigFileIDs.load(); GT_Config.sConfigFileIDs.save(); - GregTech_API.sMachineFile = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "MachineStats.cfg"))); - GregTech_API.sWorldgenFile = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "WorldGeneration.cfg"))); - GregTech_API.sMaterialProperties = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "MaterialProperties.cfg"))); - GregTech_API.sUnification = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "Unification.cfg"))); - GregTech_API.sSpecialFile = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "Other.cfg"))); - GregTech_API.sOPStuff = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "OverpoweredStuff.cfg"))); - - GregTech_API.sClientDataFile = new GT_Config( - new Configuration(new File(new File(configDir, "GregTech"), "Client.cfg"))); - return tMainConfig; + + tFile = new File(new File(configDir, "GregTech"), "Cleanroom.cfg"); + GT_Config.cleanroomFile = new Configuration(tFile); + GT_Config.cleanroomFile.load(); + GT_Config.cleanroomFile.save(); + + tFile = new File(new File(configDir, "GregTech"), "UndergroundFluids.cfg"); + GT_Config.undergroundFluidsFile = new Configuration(tFile); + GT_Config.undergroundFluidsFile.load(); + GT_Config.undergroundFluidsFile.save(); + + GregTech_API.NEIClientFIle = new GT_Config( + new Configuration(new File(new File(configDir, "GregTech"), "NEIClient.cfg"))); + } - public static void createLogFiles(File parentFile, Configuration tMainConfig) { + public static void createLogFiles(File parentFile) { GT_Log.mLogFile = new File(parentFile, "logs/GregTech.log"); if (!GT_Log.mLogFile.exists()) { try { @@ -163,8 +165,7 @@ public class GT_PreLoad { GT_Log.out = GT_Log.err = new PrintStream(GT_Log.mLogFile); } catch (FileNotFoundException ignored) {} - if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingOreDict", false) - .getBoolean(false)) { + if (ConfigGeneral.loggingOreDict) { GT_Log.mOreDictLogFile = new File(parentFile, "logs/OreDict.log"); if (!GT_Log.mOreDictLogFile.exists()) { try { @@ -183,8 +184,7 @@ public class GT_PreLoad { GT_Log.ore.println("******************************************************************************"); tList.forEach(GT_Log.ore::println); } - if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingExplosions", true) - .getBoolean(true)) { + if (ConfigGeneral.loggingExplosions) { GT_Log.mExplosionLog = new File(parentFile, "logs/Explosion.log"); if (!GT_Log.mExplosionLog.exists()) { try { @@ -196,8 +196,7 @@ public class GT_PreLoad { } catch (Throwable ignored) {} } - if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingPlayerActivity", true) - .getBoolean(true)) { + if (ConfigGeneral.loggingPlayerActicity) { GT_Log.mPlayerActivityLogFile = new File(parentFile, "logs/PlayerActivity.log"); if (!GT_Log.mPlayerActivityLogFile.exists()) { try { @@ -371,270 +370,126 @@ public class GT_PreLoad { GT_ModHandler.addScrapboxDrop(200.0F, GT_ModHandler.getIC2Item("scrap", 1L)); } - public static void loadConfig(Configuration tMainConfig) { - GT_Values.D1 = tMainConfig.get(GT_Mod.aTextGeneral, "Debug", false) - .getBoolean(false); - GT_Values.D2 = tMainConfig.get(GT_Mod.aTextGeneral, "Debug2", false) - .getBoolean(false); - GT_Values.allow_broken_recipemap = tMainConfig.get(GT_Mod.aTextGeneral, "debug allow broken recipemap", false) - .getBoolean(false); - GT_Values.debugCleanroom = tMainConfig.get(GT_Mod.aTextGeneral, "debugCleanroom", false) - .getBoolean(false); - GT_Values.debugDriller = tMainConfig.get(GT_Mod.aTextGeneral, "debugDriller", false) - .getBoolean(false); - GT_Values.debugWorldGen = tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldGen", false) - .getBoolean(false); - GT_Values.debugOrevein = tMainConfig.get(GT_Mod.aTextGeneral, "debugOrevein", false) - .getBoolean(false); - GT_Values.debugSmallOres = tMainConfig.get(GT_Mod.aTextGeneral, "debugSmallOres", false) - .getBoolean(false); - GT_Values.debugStones = tMainConfig.get(GT_Mod.aTextGeneral, "debugStones", false) - .getBoolean(false); - GT_Values.debugBlockMiner = tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockMiner", false) - .getBoolean(false); - GT_Values.debugBlockPump = tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockPump", false) - .getBoolean(false); - GT_Values.debugEntityCramming = tMainConfig.get(GT_Mod.aTextGeneral, "debugEntityCramming", false) - .getBoolean(false); - GT_Values.debugWorldData = tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldData", false) - .getBoolean(false); - GT_Values.oreveinPercentage = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPercentage_100", 100) - .getInt(100); - GT_Values.oreveinAttempts = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinAttempts_64", 64) - .getInt(64); - GT_Values.oreveinMaxPlacementAttempts = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinMaxPlacementAttempts_8", 8) - .getInt(8); - GT_Values.oreveinPlacerOres = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPlacerOres", true) - .getBoolean(true); - GT_Values.oreveinPlacerOresMultiplier = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPlacerOresMultiplier", 2) - .getInt(2); - // GT_Values.oreveinMaxSize = tMainConfig.get(aTextGeneral, "oreveinMaxSize_64",64).getInt(64); - GT_Values.ticksBetweenSounds = tMainConfig.get("machines", "TicksBetweenSounds", 30) - .getInt(30); - GT_Values.blacklistedTileEntiyClassNamesForWA = tMainConfig.getStringList( - "blacklistedTileEntiyClassNamesForWA", - "machines", - GT_Values.blacklistedTileEntiyClassNamesForWA, - "class names to be blacklisted from the world accelerator"); - GT_Values.cleanroomGlass = (float) tMainConfig.get("machines", "ReinforcedGlassPercentageForCleanroom", 5D) - .getDouble(5D); - GT_Values.enableChunkloaders = tMainConfig.get("machines", "enableChunkloaders", true) - .getBoolean(true); - GT_Values.alwaysReloadChunkloaders = tMainConfig.get("machines", "alwaysReloadChunkloaders", false) - .getBoolean(false); - GT_Values.debugChunkloaders = tMainConfig.get("machines", "debugChunkloaders", false) - .getBoolean(false); - GT_Values.disableDigitalChestsExternalAccess = tMainConfig - .get("machines", "disableDigitalChestsExternalAccess", false) - .getBoolean(false); - GT_Values.enableMultiTileEntities = tMainConfig.get( - "machines", - "enableMultiTileEntities", - false, - "This enabled MuTEs(multitile entities) to be added to the game. MuTEs are in the start of development and its not recommended to enable them unless you know what you are doing.") - .getBoolean(false) - // Make sure MuTEs are enabled in development - || (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig - .get(GT_Mod.aTextGeneral, "TicksForLagAveragingWithScanner", 25) - .getInt(25); - GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig - .get(GT_Mod.aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100) - .getInt(100); - if (tMainConfig.get(GT_Mod.aTextGeneral, "disable_STDOUT", false) - .getBoolean(false)) { - GT_FML_LOGGER.info("Disableing Console Messages."); - GT_FML_LOGGER.exit(); - System.out.close(); - System.err.close(); + public static void loadConfig() { + // general + GT_Values.D1 = ConfigDebug.D1; + GT_Values.D2 = ConfigDebug.D2; + GT_Values.allow_broken_recipemap = ConfigDebug.allowBrokenRecipeMap; + GT_Values.debugCleanroom = ConfigDebug.debugCleanroom; + GT_Values.debugDriller = ConfigDebug.debugDriller; + GT_Values.debugWorldGen = ConfigDebug.debugWorldgen; + GT_Values.debugOrevein = ConfigDebug.debugOrevein; + GT_Values.debugSmallOres = ConfigDebug.debugSmallOres; + GT_Values.debugStones = ConfigDebug.debugStones; + GT_Values.debugBlockMiner = ConfigDebug.debugBlockMiner; + GT_Values.debugBlockPump = ConfigDebug.debugBlockPump; + GT_Values.debugEntityCramming = ConfigDebug.debugEntityCramming; + GT_Values.debugWorldData = ConfigDebug.debugWorldData; + GT_Values.oreveinPercentage = ConfigGeneral.oreveinPercentage; + GT_Values.oreveinAttempts = ConfigGeneral.oreveinAttempts; + GT_Values.oreveinMaxPlacementAttempts = ConfigGeneral.oreveinMaxPlacementAttempts; + GT_Values.oreveinPlacerOres = ConfigGeneral.oreveinPlacerOres; + GT_Values.oreveinPlacerOresMultiplier = ConfigGeneral.oreveinPlacerOresMultiplier; + GregTech_API.TICKS_FOR_LAG_AVERAGING = ConfigGeneral.ticksForLagAveraging; + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = ConfigGeneral.millisecondThesholdUntilLagWarning; + GregTech_API.sTimber = ConfigGeneral.timber; + GregTech_API.sDrinksAlwaysDrinkable = ConfigGeneral.drinksAlwaysDrinkable; + GregTech_API.sDoShowAllItemsInCreative = ConfigGeneral.doShowAllItemsInCreative; + GregTech_API.sMultiThreadedSounds = ConfigGeneral.multiThreadedSounds; + GT_Mod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = ConfigGeneral.maxEqualEntitiesAtOneSpot; + GT_Mod.gregtechproxy.mFlintChance = ConfigGeneral.flintChance; + GT_Mod.gregtechproxy.mItemDespawnTime = ConfigGeneral.itemDespawnTime; + GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation = ConfigGeneral.allowSmallBoilerAutomation; + GT_Mod.gregtechproxy.mDisableVanillaOres = gregtech.common.config.worldgen.ConfigGeneral.disableVanillaOres; + GT_Mod.gregtechproxy.mIncreaseDungeonLoot = ConfigGeneral.increaseDungeonLoot; + GT_Mod.gregtechproxy.mAxeWhenAdventure = ConfigGeneral.axeWhenAdventure; + GT_Mod.gregtechproxy.mSurvivalIntoAdventure = ConfigGeneral.survivalIntoAdventure; + GT_Mod.gregtechproxy.mHungerEffect = ConfigGeneral.hungerEffect; + GT_Mod.gregtechproxy.mInventoryUnification = ConfigGeneral.inventoryUnification; + GT_Mod.gregtechproxy.mGTBees = ConfigGeneral.GTBees; + GT_Mod.gregtechproxy.mCraftingUnification = ConfigGeneral.craftingUnification; + GT_Mod.gregtechproxy.mNerfedWoodPlank = ConfigGeneral.nerfedWoodPlank; + GT_Mod.gregtechproxy.mNerfedVanillaTools = ConfigGeneral.nerfedVanillaTools; + GT_Mod.gregtechproxy.mAchievements = ConfigGeneral.achievements; + GT_Mod.gregtechproxy.mHideUnusedOres = ConfigGeneral.hideUnusedOres; + GT_Mod.gregtechproxy.mEnableAllMaterials = ConfigGeneral.enableAllMaterials; + GT_Mod.gregtechproxy.mExplosionItemDrop = ConfigGeneral.explosionItemDrop; + GT_Mod.gregtechproxy.mEnableCleanroom = ConfigGeneral.enableCleanroom; + GT_Mod.gregtechproxy.mLowGravProcessing = GalacticraftCore.isModLoaded() && ConfigGeneral.lowGravProcessing; + GT_Mod.gregtechproxy.mCropNeedBlock = ConfigGeneral.cropNeedBlock; + GT_Mod.gregtechproxy.mAMHInteraction = ConfigGeneral.autoMaintenaceHatchesInteraction; + GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = ConfigGeneral.mixedOreOnlyYieldsTwoThirdsOfPureOre; + GT_Mod.gregtechproxy.mRichOreYieldMultiplier = ConfigGeneral.richOreYieldMultiplier; + GT_Mod.gregtechproxy.mNetherOreYieldMultiplier = ConfigGeneral.netherOreYieldMultiplier; + GT_Mod.gregtechproxy.mEndOreYieldMultiplier = ConfigGeneral.endOreYieldMultiplier; + GT_Mod.gregtechproxy.gt6Pipe = ConfigGeneral.gt6Pipe; + GT_Mod.gregtechproxy.gt6Cable = ConfigGeneral.gt6Cable; + GT_Mod.gregtechproxy.ic2EnergySourceCompat = ConfigGeneral.ic2EnergySourceCompat; + GT_Mod.gregtechproxy.costlyCableConnection = ConfigGeneral.costlyCableConnection; + GT_Mod.gregtechproxy.crashOnNullRecipeInput = ConfigGeneral.crashOnNullRecipeInput; + if ((boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) { + GT_Mod.gregtechproxy.crashOnNullRecipeInput = false; // Use flags in GT_RecipeBuilder instead! + } + GT_LanguageManager.i18nPlaceholder = ConfigGeneral.i18nPlaceholder; + GT_MetaTileEntity_LongDistancePipelineBase.minimalDistancePoints = ConfigGeneral.minimalDistancePoints; + GT_Values.mCTMEnabledBlock.addAll(Arrays.asList(ConfigGeneral.CTMWhitelist)); + GT_Values.mCTMDisabledBlock.addAll(Arrays.asList(ConfigGeneral.CTMBlacklist)); + if (ConfigGeneral.harderMobSpawner) { + Blocks.mob_spawner.setHardness(500.0F) + .setResistance(6000000.0F); } - GregTech_API.sMachineExplosions = tMainConfig.get("machines", "machines_explosion_damage", true) - .getBoolean(false); - GregTech_API.sMachineFlammable = tMainConfig.get("machines", "machines_flammable", true) - .getBoolean(false); - GregTech_API.sMachineNonWrenchExplosions = tMainConfig.get("machines", "explosions_on_nonwrenching", true) - .getBoolean(false); - GregTech_API.sMachineWireFire = tMainConfig.get("machines", "wirefire_on_explosion", true) - .getBoolean(false); - GregTech_API.sMachineFireExplosions = tMainConfig.get("machines", "fire_causes_explosions", true) - .getBoolean(false); - GregTech_API.sMachineRainExplosions = tMainConfig.get("machines", "rain_causes_explosions", true) - .getBoolean(false); - GregTech_API.sMachineThunderExplosions = tMainConfig.get("machines", "lightning_causes_explosions", true) - .getBoolean(false); - GregTech_API.sConstantEnergy = tMainConfig.get("machines", "constant_need_of_energy", true) - .getBoolean(false); - GregTech_API.sColoredGUI = tMainConfig.get("machines", "colored_guis_when_painted", true) - .getBoolean(false); - GregTech_API.sMachineMetalGUI = tMainConfig.get("machines", "guis_in_consistent_machine_metal_color", false) - .getBoolean(false); + // machines + GT_Values.ticksBetweenSounds = ConfigMachines.ticksBetweenSounds; + GT_Values.blacklistedTileEntiyClassNamesForWA = ConfigMachines.blacklistedTileEntiyClassNamesForWA; + GT_Values.cleanroomGlass = ConfigMachines.cleanroomGlass; + GT_Values.enableChunkloaders = ConfigMachines.enableChunkloaders; + GT_Values.alwaysReloadChunkloaders = ConfigMachines.alwaysReloadChunkloaders; + GT_Values.debugChunkloaders = ConfigDebug.debugChunkloaders; + GT_Values.disableDigitalChestsExternalAccess = ConfigMachines.disableDigitalChestsExternalAccess; + GT_Values.enableMultiTileEntities = ConfigMachines.enableMultiTileEntities + || (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); + GregTech_API.sMachineExplosions = ConfigMachines.machineExplosions; + GregTech_API.sMachineFlammable = ConfigMachines.machineFlammable; + GregTech_API.sMachineNonWrenchExplosions = ConfigMachines.machineNonWrenchExplosions; + GregTech_API.sMachineWireFire = ConfigMachines.machineWireFire; + GregTech_API.sMachineFireExplosions = ConfigMachines.machineFireExplosions; + GregTech_API.sMachineRainExplosions = ConfigMachines.machineRainExplosions; + GregTech_API.sMachineThunderExplosions = ConfigMachines.machineThunderExplosions; + GregTech_API.sColoredGUI = ConfigMachines.coloredGUI; + GregTech_API.sMachineMetalGUI = ConfigMachines.machineMetalGUI; // Implementation for this is actually handled in NewHorizonsCoreMod in MainRegistry.java! - GregTech_API.sUseMachineMetal = tMainConfig.get("machines", "use_machine_metal_tint", true) - .getBoolean(true); - - GregTech_API.sTimber = tMainConfig.get(GT_Mod.aTextGeneral, "timber_axe", true) - .getBoolean(true); - GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get(GT_Mod.aTextGeneral, "drinks_always_drinkable", false) - .getBoolean(false); - GregTech_API.sDoShowAllItemsInCreative = tMainConfig - .get(GT_Mod.aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false) - .getBoolean(false); - GregTech_API.sMultiThreadedSounds = tMainConfig.get(GT_Mod.aTextGeneral, "sound_multi_threading", false) - .getBoolean(false); + GregTech_API.sUseMachineMetal = ConfigMachines.useMachineMetal; + // client loadClientConfig(); - GT_Mod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig - .get(GT_Mod.aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3) - .getInt(3); - GT_Mod.gregtechproxy.mSkeletonsShootGTArrows = tMainConfig - .get(GT_Mod.aTextGeneral, "SkeletonsShootGTArrows", 16) - .getInt(16); - GT_Mod.gregtechproxy.mFlintChance = tMainConfig.get(GT_Mod.aTextGeneral, "FlintAndSteelChance", 30) - .getInt(30); - GT_Mod.gregtechproxy.mItemDespawnTime = tMainConfig.get(GT_Mod.aTextGeneral, "ItemDespawnTime", 6000) - .getInt(6000); - GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation = tMainConfig - .get(GT_Mod.aTextGeneral, "AllowSmallBoilerAutomation", false) - .getBoolean(false); - GT_Mod.gregtechproxy.mDisableVanillaOres = tMainConfig.get(GT_Mod.aTextGeneral, "DisableVanillaOres", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get(GT_Mod.aTextGeneral, "IncreaseDungeonLoot", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mAxeWhenAdventure = tMainConfig.get(GT_Mod.aTextGeneral, "AdventureModeStartingAxe", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mSurvivalIntoAdventure = tMainConfig.get(GT_Mod.aTextGeneral, "forceAdventureMode", false) - .getBoolean(false); - GT_Mod.gregtechproxy.mHungerEffect = tMainConfig.get(GT_Mod.aTextGeneral, "AFK_Hunger", false) - .getBoolean(false); - GT_Mod.gregtechproxy.mInventoryUnification = tMainConfig.get(GT_Mod.aTextGeneral, "InventoryUnification", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mGTBees = tMainConfig.get(GT_Mod.aTextGeneral, "GTBees", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mCraftingUnification = tMainConfig.get(GT_Mod.aTextGeneral, "CraftingUnification", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mNerfedWoodPlank = tMainConfig.get(GT_Mod.aTextGeneral, "WoodNeedsSawForCrafting", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mNerfedVanillaTools = tMainConfig - .get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mAchievements = tMainConfig.get(GT_Mod.aTextGeneral, "EnableAchievements", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mHideUnusedOres = tMainConfig.get(GT_Mod.aTextGeneral, "HideUnusedOres", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mEnableAllMaterials = tMainConfig.get("general", "EnableAllMaterials", false) - .getBoolean(false); - - // Pollution: edit GT_Proxy.java to change default values - GT_Mod.gregtechproxy.mPollution = tMainConfig - .get("Pollution", "EnablePollution", GT_Mod.gregtechproxy.mPollution) - .getBoolean(GT_Mod.gregtechproxy.mPollution); - GT_Mod.gregtechproxy.mPollutionSmogLimit = tMainConfig - .get("Pollution", "SmogLimit", GT_Mod.gregtechproxy.mPollutionSmogLimit) - .getInt(GT_Mod.gregtechproxy.mPollutionSmogLimit); - GT_Mod.gregtechproxy.mPollutionPoisonLimit = tMainConfig - .get("Pollution", "PoisonLimit", GT_Mod.gregtechproxy.mPollutionPoisonLimit) - .getInt(GT_Mod.gregtechproxy.mPollutionPoisonLimit); - GT_Mod.gregtechproxy.mPollutionVegetationLimit = tMainConfig - .get("Pollution", "VegetationLimit", GT_Mod.gregtechproxy.mPollutionVegetationLimit) - .getInt(GT_Mod.gregtechproxy.mPollutionVegetationLimit); - GT_Mod.gregtechproxy.mPollutionSourRainLimit = tMainConfig - .get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionSourRainLimit) - .getInt(GT_Mod.gregtechproxy.mPollutionSourRainLimit); - GT_Mod.gregtechproxy.mPollutionOnExplosion = tMainConfig - .get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionOnExplosion) - .getInt(GT_Mod.gregtechproxy.mPollutionOnExplosion); - GT_Mod.gregtechproxy.mExplosionItemDrop = tMainConfig - .get("general", "ExplosionItemDrops", GT_Mod.gregtechproxy.mExplosionItemDrop) - .getBoolean(GT_Mod.gregtechproxy.mExplosionItemDrop); - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = tMainConfig - .get( - "Pollution", - "PollutionPrimitiveBlastFurnace", - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); - GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond = tMainConfig - .get("Pollution", "PollutionCharcoalPit", GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond); - GT_Mod.gregtechproxy.mPollutionEBFPerSecond = tMainConfig - .get("Pollution", "PollutionEBF", GT_Mod.gregtechproxy.mPollutionEBFPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionEBFPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = tMainConfig - .get( - "Pollution", - "PollutionLargeCombustionEngine", - GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond); - GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = tMainConfig - .get( - "Pollution", - "PollutionExtremeCombustionEngine", - GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond); - GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond = tMainConfig - .get( - "Pollution", - "PollutionImplosionCompressor", - GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = tMainConfig - .get("Pollution", "PollutionLargeBronzeBoiler", GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = tMainConfig - .get("Pollution", "PollutionLargeSteelBoiler", GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = tMainConfig - .get( - "Pollution", - "PollutionLargeTitaniumBoiler", - GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = tMainConfig - .get( - "Pollution", - "PollutionLargeTungstenSteelBoiler", - GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle = tMainConfig - .get("Pollution", "PollutionReleasedByThrottle", GT_Mod.gregtechproxy.mPollutionReleasedByThrottle) - .getDouble(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle); - GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = tMainConfig - .get("Pollution", "PollutionLargeGasTurbine", GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond); - GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond = tMainConfig - .get("Pollution", "PollutionMultiSmelter", GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond); - GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = tMainConfig - .get("Pollution", "PollutionPyrolyseOven", GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond); - GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = tMainConfig - .get("Pollution", "PollutionSmallCoalBoiler", GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = tMainConfig - .get( - "Pollution", - "PollutionHighPressureLavaBoiler", - GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = tMainConfig - .get( - "Pollution", - "PollutionHighPressureCoalBoiler", - GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = tMainConfig - .get( - "Pollution", - "PollutionBaseDieselGenerator", - GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond); - double[] mPollutionDieselGeneratorReleasedByTier = tMainConfig - .get( - "Pollution", - "PollutionReleasedByTierDieselGenerator", - GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier) - .getDoubleList(); + // Pollution + GT_Mod.gregtechproxy.mPollution = ConfigPollution.pollution; + GT_Mod.gregtechproxy.mPollutionSmogLimit = ConfigPollution.pollutionSmogLimit; + GT_Mod.gregtechproxy.mPollutionPoisonLimit = ConfigPollution.pollutionPoisonLimit; + GT_Mod.gregtechproxy.mPollutionVegetationLimit = ConfigPollution.pollutionVegetationLimit; + GT_Mod.gregtechproxy.mPollutionSourRainLimit = ConfigPollution.pollutionSourRainLimit; + GT_Mod.gregtechproxy.mPollutionOnExplosion = ConfigPollution.pollutionOnExplosion; + GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = ConfigPollution.pollutionPrimitveBlastFurnacePerSecond; + GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond = ConfigPollution.pollutionCharcoalPitPerSecond; + GT_Mod.gregtechproxy.mPollutionEBFPerSecond = ConfigPollution.pollutionEBFPerSecond; + GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = ConfigPollution.pollutionLargeCombustionEnginePerSecond; + GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = ConfigPollution.pollutionExtremeCombustionEnginePerSecond; + GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond = ConfigPollution.pollutionImplosionCompressorPerSecond; + GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = ConfigPollution.pollutionLargeBronzeBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = ConfigPollution.pollutionLargeSteelBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = ConfigPollution.pollutionLargeTitaniumBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = ConfigPollution.pollutionLargeTungstenSteelBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionReleasedByThrottle = ConfigPollution.pollutionReleasedByThrottle; + GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = ConfigPollution.pollutionLargeGasTurbinePerSecond; + GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond = ConfigPollution.pollutionMultiSmelterPerSecond; + GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = ConfigPollution.pollutionPyrolyseOvenPerSecond; + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = ConfigPollution.pollutionSmallCoalBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = ConfigPollution.pollutionHighPressureLavaBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = ConfigPollution.pollutionHighPressureCoalBoilerPerSecond; + GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = ConfigPollution.pollutionBaseDieselGeneratorPerSecond; + double[] mPollutionDieselGeneratorReleasedByTier = ConfigPollution.pollutionDieselGeneratorReleasedByTier; if (mPollutionDieselGeneratorReleasedByTier.length == GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier.length) { GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = mPollutionDieselGeneratorReleasedByTier; @@ -642,18 +497,8 @@ public class GT_PreLoad { GT_FML_LOGGER .error("The Length of the Diesel Turbine Pollution Array Config must be the same as the Default"); } - GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig - .get( - "Pollution", - "PollutionBaseGasTurbineGenerator", - GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond) - .getInt(GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond); - double[] mPollutionGasTurbineReleasedByTier = tMainConfig - .get( - "Pollution", - "PollutionReleasedByTierGasTurbineGenerator", - GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier) - .getDoubleList(); + GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = ConfigPollution.pollutionBaseGasTurbinePerSecond; + double[] mPollutionGasTurbineReleasedByTier = ConfigPollution.pollutionGasTurbineReleasedByTier; if (mPollutionGasTurbineReleasedByTier.length == GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier.length) { GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = mPollutionGasTurbineReleasedByTier; @@ -661,223 +506,107 @@ public class GT_PreLoad { GT_FML_LOGGER.error("The Length of the Gas Turbine Pollution Array Config must be the same as the Default"); } - GT_Mod.gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); - GT_Mod.gregtechproxy.enableUndergroundGravelGen = GregTech_API.sWorldgenFile - .get("general", "enableUndergroundGravelGen", GT_Mod.gregtechproxy.enableUndergroundGravelGen); - GT_Mod.gregtechproxy.enableUndergroundDirtGen = GregTech_API.sWorldgenFile - .get("general", "enableUndergroundDirtGen", GT_Mod.gregtechproxy.enableUndergroundDirtGen); - GT_Mod.gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true) - .getBoolean(true); - if (GT_Mod.gregtechproxy.mEnableCleanroom) GT_MetaTileEntity_Cleanroom.loadConfig(tMainConfig); - GT_Mod.gregtechproxy.mLowGravProcessing = GalacticraftCore.isModLoaded() - && tMainConfig.get("general", "LowGravProcessing", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mUseGreatlyShrukenReplacementList = tMainConfig - .get("general", "GTNH Optimised Material Loading", true) - .getBoolean(true); - Calendar now = Calendar.getInstance(); - GT_Mod.gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get( - ConfigCategories.general, - "AprilFool", - now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1); - GT_Mod.gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true) - .getBoolean(true); - GT_Mod.gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", false) - .getBoolean(false); - GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); - GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); - GregTech_API.mEUtoRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "100EUtoRF", 360); - GregTech_API.mRFtoEU = GregTech_API.sOPStuff.get(ConfigCategories.general, "100RFtoEU", 20); - GregTech_API.mRFExplosions = GregTech_API.sOPStuff.get(ConfigCategories.general, "RFExplosions", false); - GregTech_API.meIOLoaded = EnderIO.isModLoaded(); - GT_Mod.gregtechproxy.mForceFreeFace = GregTech_API.sMachineFile - .get(ConfigCategories.machineconfig, "forceFreeFace", true); - GT_Mod.gregtechproxy.mBrickedBlastFurnace = tMainConfig.get("general", "BrickedBlastFurnace", true) - .getBoolean(true); - - GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = tMainConfig - .get("general", "MixedOreOnlyYieldsTwoThirdsOfPureOre", false) - .getBoolean(false); - GT_Mod.gregtechproxy.mRichOreYieldMultiplier = tMainConfig.get("general", "RichOreYieldMultiplier", true) - .getBoolean(false); - GT_Mod.gregtechproxy.mNetherOreYieldMultiplier = tMainConfig.get("general", "NetherOreYieldMultiplier", true) - .getBoolean(false); - GT_Mod.gregtechproxy.mEndOreYieldMultiplier = tMainConfig.get("general", "EndOreYieldMultiplier", true) - .getBoolean(false); - GT_Mod.gregtechproxy.enableBlackGraniteOres = GregTech_API.sWorldgenFile - .get("general", "enableBlackGraniteOres", GT_Mod.gregtechproxy.enableBlackGraniteOres); - GT_Mod.gregtechproxy.enableRedGraniteOres = GregTech_API.sWorldgenFile - .get("general", "enableRedGraniteOres", GT_Mod.gregtechproxy.enableRedGraniteOres); - GT_Mod.gregtechproxy.enableMarbleOres = GregTech_API.sWorldgenFile - .get("general", "enableMarbleOres", GT_Mod.gregtechproxy.enableMarbleOres); - GT_Mod.gregtechproxy.enableBasaltOres = GregTech_API.sWorldgenFile - .get("general", "enableBasaltOres", GT_Mod.gregtechproxy.enableBasaltOres); - GT_Mod.gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesConnection", true) - .getBoolean(true); - GT_Mod.gregtechproxy.gt6Cable = tMainConfig.get("general", "GT6StyledWiresConnection", true) - .getBoolean(true); - GT_Mod.gregtechproxy.ic2EnergySourceCompat = tMainConfig.get("general", "Ic2EnergySourceCompat", true) - .getBoolean(true); |
