diff --git a/src/main/java/io/gitlab/jfronny/modsmod/FabricLoaderInterface.java b/src/main/java/io/gitlab/jfronny/modsmod/FabricLoaderInterface.java index 9ada912..490a8c7 100644 --- a/src/main/java/io/gitlab/jfronny/modsmod/FabricLoaderInterface.java +++ b/src/main/java/io/gitlab/jfronny/modsmod/FabricLoaderInterface.java @@ -19,8 +19,6 @@ public class FabricLoaderInterface { private static final Method addModMethod; private static final Field modsField; - //private static final Field abstractListModCount; - static { try { addModMethod = FabricLoader.class.getDeclaredMethod("addMod", ModCandidate.class); @@ -29,8 +27,6 @@ public class FabricLoaderInterface { modsField = FabricLoader.class.getDeclaredField("mods"); modsField.setAccessible(true); - //abstractListModCount = AbstractList.class.getDeclaredField("modCount"); - //abstractListModCount.setAccessible(true); } catch (NoSuchMethodException | NoSuchFieldException e) { logger.error("Failed to get reference to fabric-loader internals. The fabric-loader version may be incompatible with patchwork-runtime.", e); throw new IllegalStateException(e); @@ -62,13 +58,4 @@ public class FabricLoaderInterface { throw new IllegalStateException(e); } } - - public static List getMods(FabricLoader fabricLoader) { - try { - return (List) modsField.get(fabricLoader); - } catch (IllegalAccessException e) { - logger.error("Failed to get mods from fabric-loader.", e); - throw new IllegalStateException(e); - } - } }