Pass the correct (mutable) targets set to plugins, fixes #485

This commit is contained in:
Mumfrey committed 2021-06-24 20:22:28 +01:00
1 parent 4517718cc6
commit 65b4f9d55a
2 files changed
+9 -1

No files matched your search

@@ -1012,6 +1012,14 @@ final class MixinConfig implements Comparable<MixinConfig>, IMixinConfig {
public IMixinConfigPlugin getPlugin() {
return this.plugin.get();
}
/**
* Returns a mutable view of the targets set, used to pass the targets to
* config plugins
*/
public Set<String> getTargetsSet() {
return this.mixinMapping.keySet();
}
/* (non-Javadoc)
* @see org.spongepowered.asm.mixin.transformer.IMixinConfig#getTargets()
@@ -538,7 +538,7 @@ class MixinProcessor {
}
}
plugin.acceptTargets(config.getTargets(), Collections.<String>unmodifiableSet(otherTargets));
plugin.acceptTargets(config.getTargetsSet(), Collections.<String>unmodifiableSet(otherTargets));
}
for (MixinConfig config : this.pendingConfigs) {