diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-05-14 00:59:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-14 09:59:25 +0200 |
commit | 2c592090b9448203559e01326bc2c2d995b15d53 (patch) | |
tree | 821d347aefc828c214d817c8b7be8cf3c0b0ea9f /src/main/java/cc/polyfrost/oneconfig/init | |
parent | 4b8f98aa1435817c13e7083e30896ef8b5cbdaf0 (diff) | |
download | OneConfig-2c592090b9448203559e01326bc2c2d995b15d53.tar.gz OneConfig-2c592090b9448203559e01326bc2c2d995b15d53.tar.bz2 OneConfig-2c592090b9448203559e01326bc2c2d995b15d53.zip |
de-minecraftify a lot of things + use mixin instead of reflection (#11)
* de-minecraftify
* use mixin instead of reflection
* lol
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/init')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/init/OneConfigInit.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/init/OneConfigInit.java b/src/main/java/cc/polyfrost/oneconfig/init/OneConfigInit.java new file mode 100644 index 0000000..9c9595d --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/init/OneConfigInit.java @@ -0,0 +1,20 @@ +package cc.polyfrost.oneconfig.init; + +import net.minecraft.launchwrapper.Launch; +import org.spongepowered.asm.launch.MixinBootstrap; +import org.spongepowered.asm.mixin.Mixins; + +/** + * Initializes the OneConfig mod. + * <p>MUST BE CALLED VIA AN ITWEAKER / FMLLOADINGPLUGIN FOR 1.12 AND BELOW, OR A PRELAUNCH TWEAKER FOR 1.14+ FABRIC.</p> + */ +@SuppressWarnings("unused") +public class OneConfigInit { + public static void initialize(String[] args) { + if (!Launch.blackboard.containsKey("oneconfig.initialized")) { + Launch.blackboard.put("oneconfig.initialized", true); + MixinBootstrap.init(); + Mixins.addConfiguration("mixins.oneconfig.json"); + } + } +} |