diff --git a/src/main/java/io/github/tox1cozz/mixinbooterlegacy/loader/mixin/LoadControllerMixin.java b/src/main/java/io/github/tox1cozz/mixinbooterlegacy/loader/mixin/LoadControllerMixin.java index d39128a..445edde 100644 --- a/src/main/java/io/github/tox1cozz/mixinbooterlegacy/loader/mixin/LoadControllerMixin.java +++ b/src/main/java/io/github/tox1cozz/mixinbooterlegacy/loader/mixin/LoadControllerMixin.java @@ -38,12 +38,12 @@ private void beforeConstructing(LoaderState state, Object[] eventData, CallbackI MixinBooterLegacyPlugin.LOGGER.info("Instantiating all ILateMixinLoader implemented classes..."); - for (ASMDataTable.ASMData asmData : asmDataTable.getAll(LateMixin.class.getName().replace('.', '/'))) { + for (ASMDataTable.ASMData asmData : asmDataTable.getAll(LateMixin.class.getName())) { modClassLoader.addFile(asmData.getCandidate().getModContainer()); // Add to path before `newInstance` Class clazz = Class.forName(asmData.getClassName().replace('/', '.')); MixinBooterLegacyPlugin.LOGGER.info("Instantiating {} for its mixins.", clazz); - if (!clazz.isAssignableFrom(ILateMixinLoader.class)) { + if (!ILateMixinLoader.class.isAssignableFrom(clazz)) { throw new MixinInitialisationError(String.format("The class %s has the LateMixin annotation, but does not implement the ILateMixinLoader interface.", clazz.getName())); } @@ -98,4 +98,4 @@ private void beforeConstructing(LoaderState state, Object[] eventData, CallbackI prepareConfigsMethod.invoke(processor, env, extensions); } } -} \ No newline at end of file +}