From 8ae6280419c062db6a9568fbca945d0c2b98eaff Mon Sep 17 00:00:00 2001 From: JFronny <33260128+jfronny@users.noreply.github.com> Date: Sat, 12 Dec 2020 18:24:04 +0100 Subject: [PATCH] Remove some unused code --- .../jfronny/modsmod/FabricLoaderInterface.java | 13 ------------- 1 file changed, 13 deletions(-) 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); - } - } }