diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-30 01:48:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 01:48:09 +0000 |
commit | 5af823e80a611090216375fecd3794d345446830 (patch) | |
tree | c54a19977b4a25cb86f54394eb9711aaf268efe3 /src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java | |
parent | a731e939c6b9a70ac9fd444dbf06243f63f29c06 (diff) | |
parent | cc825179dce70a5f2c4a13730639e3300243e21a (diff) | |
download | GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.tar.gz GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.tar.bz2 GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.zip |
Merge pull request #525 from alkcorp/DevTop
+ 6 Months of work, let's get the ball rolling.
Diffstat (limited to 'src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java')
-rw-r--r-- | src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java index c175d921b1..d8a4bf96f5 100644 --- a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java +++ b/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java @@ -15,6 +15,7 @@ import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.versioning.ArtifactVersion; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; import gtPlusPlus.preloader.CORE_Preloader; import net.minecraftforge.common.config.Configuration; @@ -72,12 +73,28 @@ public class Preloader_DummyContainer extends DummyModContainer { } public static void handleConfigFile(final FMLPreInitializationEvent event) { - final Configuration config = new Configuration( - new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); + final Configuration config = new Configuration(new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); config.load(); + //BGM Watchdog + CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); + // Circuits - CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, - "Restores circuits and their recipes from Pre-5.09.28 times."); + CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); + } + + public static boolean getConfig(){ + final Configuration config = new Configuration( new File(Utils.getMcDir(), "config/GTplusplus/GTplusplus.cfg")); + if (config != null){ + config.load(); + // Circuits + CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); + CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); + + Logger.INFO("GT++ Preloader - Loaded the configuration file."); + return true; + } + Logger.INFO("GT++ Preloader - Failed loading the configuration file."); + return false; } }
\ No newline at end of file |