Remove some unused code

This commit is contained in:
JFronny 2020-12-12 18:24:04 +01:00
parent e08615177a
commit 8ae6280419
1 changed files with 0 additions and 13 deletions

View File

@ -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<ModContainer> getMods(FabricLoader fabricLoader) {
try {
return (List<ModContainer>) modsField.get(fabricLoader);
} catch (IllegalAccessException e) {
logger.error("Failed to get mods from fabric-loader.", e);
throw new IllegalStateException(e);
}
}
}