Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tox1cozZ committed Jan 28, 2023
1 parent 7693ae9 commit 1d0e2da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface LateMixin {}
@Target(ElementType.TYPE)
public @interface LateMixin {
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ private void beforeConstructing(LoaderState state, Object[] eventData, CallbackI
Class<?> clazz = Class.forName(asmData.getClassName().replace('/', '.'));
MixinBooterLegacyPlugin.LOGGER.info("Instantiating {} for its mixins.", clazz);

if (!clazz.isAssignableFrom(ILateMixinLoader.class))
if (!clazz.isAssignableFrom(ILateMixinLoader.class)) {
throw new MixinInitialisationError(String.format("The class %s has the LateMixin annotation, but does not implement the ILateMixinLoader interface.", clazz.getName()));
}

ILateMixinLoader loader = (ILateMixinLoader) clazz.newInstance();
ILateMixinLoader loader = (ILateMixinLoader)clazz.newInstance();
for (String mixinConfig : loader.getMixinConfigs()) {
if (loader.shouldMixinConfigQueue(mixinConfig)) {
MixinBooterLegacyPlugin.LOGGER.info("Adding {} mixin configuration.", mixinConfig);
Expand Down

0 comments on commit 1d0e2da

Please sign in to comment.