From ba87b8b1fa4e2397a3e0ed5a18f7ea6137d42f77 Mon Sep 17 00:00:00 2001
From: Wyvest <45589059+Wyvest@users.noreply.github.com>
Date: Sat, 21 May 2022 17:50:43 +0700
Subject: vigilance compat (#15)
* vigilance compat
reorganize ASM
* remove non-RenderManager nanovg usage wherever possible
fix build
generalize utils
* setupGradle task
* migrate to kotlin gradle
use essential gradle toolkit
shade new gson
* Small changes
* Update .gitignore
* fix natives
* Fix all problems
* null
Co-authored-by: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>
---
.../polyfrost/oneconfig/plugin/LoadingPlugin.java | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 src/main/java/cc/polyfrost/oneconfig/plugin/LoadingPlugin.java
(limited to 'src/main/java/cc/polyfrost/oneconfig/plugin/LoadingPlugin.java')
diff --git a/src/main/java/cc/polyfrost/oneconfig/plugin/LoadingPlugin.java b/src/main/java/cc/polyfrost/oneconfig/plugin/LoadingPlugin.java
new file mode 100644
index 0000000..be2b399
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/plugin/LoadingPlugin.java
@@ -0,0 +1,54 @@
+package cc.polyfrost.oneconfig.plugin;
+
+import cc.polyfrost.oneconfig.init.OneConfigInit;
+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;
+
+public class LoadingPlugin implements IFMLLoadingPlugin {
+
+ /**
+ * Taken from LWJGLTwoPointFive under The Unlicense
+ * https://github.com/DJtheRedstoner/LWJGLTwoPointFive/blob/master/LICENSE/
+ */
+ public LoadingPlugin() {
+ try {
+ Field f_exceptions = LaunchClassLoader.class.getDeclaredField("classLoaderExceptions");
+ f_exceptions.setAccessible(true);
+ Set exceptions = (Set) f_exceptions.get(Launch.classLoader);
+ exceptions.remove("org.lwjgl.");
+ OneConfigInit.initialize(new String[]{});
+ } catch (Exception e) {
+ throw new RuntimeException("e");
+ }
+ }
+
+ @Override
+ public String[] getASMTransformerClass() {
+ return new String[]{"cc.polyfrost.oneconfig.plugin.asm.ClassTransformer"};
+ }
+
+ @Override
+ public String getModContainerClass() {
+ return null;
+ }
+
+ @Override
+ public String getSetupClass() {
+ return null;
+ }
+
+ @Override
+ public void injectData(Map data) {
+
+ }
+
+ @Override
+ public String getAccessTransformerClass() {
+ return null;
+ }
+}
\ No newline at end of file
--
cgit