Skip to content

MixinTargetAlreadyLoadedException is thrown regardless of the return value of shouldApplyMixin #122

@ishland

Description

@ishland

See ishland/EarlyLoadingScreen#1

It appears that Mixin is checking whether the class is loaded before calling shouldApplyMixin, causing this to happen:

for (Object target : this.readTargets(mixin)) {
DeclaredTarget declaredTarget = DeclaredTarget.of(target, this);
if (declaredTarget == null) {
continue;
}
if (tracker != null && tracker.isClassLoaded(declaredTarget.name) && !this.isReloading()) {
String message = String.format("Critical problem: %s target %s was loaded too early.", this, declaredTarget.name);
if (this.parent.isRequired()) {
throw new MixinTargetAlreadyLoadedException(this, message, declaredTarget.name);
}
this.logger.error(message);
}
if (this.shouldApplyMixin(ignorePlugin, declaredTarget.name)) {
declaredTargets.add(declaredTarget);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions