diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-07-26 04:23:36 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-07-26 04:23:36 +0100 |
commit | 9fe3f693f1d6d015f45898818b7958b3a57a9f4a (patch) | |
tree | 1e35a386d5ab58244e6a6e8249f947b321de5828 /src/Java/gtPlusPlus/preloader | |
parent | 5a3076e52ea188c69851e0c8711937485123dc18 (diff) | |
download | GT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.tar.gz GT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.tar.bz2 GT5-Unofficial-9fe3f693f1d6d015f45898818b7958b3a57a9f4a.zip |
+ Added config option to adjust ingame BGM delays. (Should be working)
+ Added a Pest Killer for quick removal of Butterflies and Bats.
+ Added Hydrogen Cyanide.
% Replaced existing assets for the Bat King.
% Replaced Bat King Logic, it's now an offensive mob.
$ Fixed Bat King model scaling.
Diffstat (limited to 'src/Java/gtPlusPlus/preloader')
3 files changed, 29 insertions, 28 deletions
diff --git a/src/Java/gtPlusPlus/preloader/CORE_Preloader.java b/src/Java/gtPlusPlus/preloader/CORE_Preloader.java index 09ce810ccd..b8ebdaf49c 100644 --- a/src/Java/gtPlusPlus/preloader/CORE_Preloader.java +++ b/src/Java/gtPlusPlus/preloader/CORE_Preloader.java @@ -7,7 +7,8 @@ import java.util.List; public class CORE_Preloader { public static final String NAME = "GT++ Preloader"; public static final String MODID = "GT++_Preloader"; - public static final String VERSION = "0.3-Alpha"; + public static final String VERSION = "0.4-Beta"; public static boolean enableOldGTcircuits = false; + public static int enableWatchdogBGM = 0; public static List<?> DEPENDENCIES = new ArrayList<>(Arrays.asList(new String[] {"required-before:gregtech;"})); } 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 diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java index cba11d4e29..05a476c1c8 100644 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java +++ b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java @@ -1,8 +1,10 @@ package gtPlusPlus.preloader.asm.transformers; -import static org.objectweb.asm.Opcodes.*; - -import java.io.File; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.IFEQ; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.RETURN; import org.apache.logging.log4j.Level; import org.objectweb.asm.ClassVisitor; @@ -11,26 +13,7 @@ import org.objectweb.asm.MethodVisitor; import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.preloader.CORE_Preloader; -import net.minecraftforge.common.config.Configuration; - -public class Preloader_ClassTransformer { - - 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."); - Logger.INFO("GT++ ASM - Loaded the configuration file."); - return CORE_Preloader.enableOldGTcircuits; - } - Logger.INFO("GT++ ASM - Failed loading the configuration file."); - return false; - } +public class Preloader_ClassTransformer { public static final class OreDictionaryVisitor extends ClassVisitor { |