diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-18 18:11:17 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-04-18 18:11:17 +0200 |
commit | 01c2733db797fc1bb88cee627f792d05ab00f379 (patch) | |
tree | 6b448f04b05fc2c746f2ba542f8c8b0ebb987d8f /src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java | |
parent | 859f214759c688fcaaf97a2a02f933a28662c116 (diff) | |
parent | 2265233e317298db1da920430b8f8c21d6e3067e (diff) | |
download | OneConfig-01c2733db797fc1bb88cee627f792d05ab00f379.tar.gz OneConfig-01c2733db797fc1bb88cee627f792d05ab00f379.tar.bz2 OneConfig-01c2733db797fc1bb88cee627f792d05ab00f379.zip |
temporary commit so no more conflicts now stop touching me code :anrgydoggo:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java new file mode 100644 index 0000000..1f48135 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/plugin/LoadingPlugin.java @@ -0,0 +1,52 @@ +package io.polyfrost.oneconfig.lwjgl.plugin; + +import net.minecraft.launchwrapper.Launch; +import net.minecraft.launchwrapper.LaunchClassLoader; +import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; + +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Set; + +/** + * Taken from LWJGLTwoPointFive under The Unlicense + * https://github.com/DJtheRedstoner/LWJGLTwoPointFive/blob/master/LICENSE/ + */ +public class LoadingPlugin implements IFMLLoadingPlugin { + + public LoadingPlugin() { + try { + Field f_exceptions = LaunchClassLoader.class.getDeclaredField("classLoaderExceptions"); + f_exceptions.setAccessible(true); + Set<String> exceptions = (Set<String>) f_exceptions.get(Launch.classLoader); + exceptions.remove("org.lwjgl."); + } catch (Exception e) { + throw new RuntimeException("e"); + } + } + + @Override + public String[] getASMTransformerClass() { + return new String[]{"io.polyfrost.oneconfig.lwjgl.plugin.ClassTransformer"}; + } + + @Override + public String getModContainerClass() { + return null; + } + + @Override + public String getSetupClass() { + return null; + } + + @Override + public void injectData(Map<String, Object> data) { + + } + + @Override + public String getAccessTransformerClass() { + return null; + } +}
\ No newline at end of file |