Skip to content

Commit

Permalink
Fix LateMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
mts2200 authored Mar 4, 2023
1 parent 1d0e2da commit e40f374
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

Expand Down Expand Up @@ -98,4 +98,4 @@ private void beforeConstructing(LoaderState state, Object[] eventData, CallbackI
prepareConfigsMethod.invoke(processor, env, extensions);
}
}
}
}

0 comments on commit e40f374

Please sign in to comment.