mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-20 02:59:34 +00:00
Respect remap on Mixin for At, allow annot to override mixin, fixes #177
This commit is contained in:
1 parent
ffc72c7ab6
commit
3329a3d084
3 files changed
+10
-4
No files matched your search
+6
-1
@@ -95,6 +95,10 @@ class AnnotatedMixinElementHandlerInjector extends AnnotatedMixinElementHandler
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public boolean shouldRemap() {
|
||||
return this.at.getBoolean("remap", this.state.shouldRemap());
|
||||
}
|
||||
|
||||
public AnnotationHandle getAt() {
|
||||
return this.at;
|
||||
}
|
||||
@@ -121,6 +125,7 @@ class AnnotatedMixinElementHandlerInjector extends AnnotatedMixinElementHandler
|
||||
public void notifyRemapped() {
|
||||
this.state.notifyRemapped();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AnnotatedMixinElementHandlerInjector(IMixinAnnotationProcessor ap, AnnotatedMixin mixin) {
|
||||
@@ -211,7 +216,7 @@ class AnnotatedMixinElementHandlerInjector extends AnnotatedMixinElementHandler
|
||||
this.ap.printMessage(Kind.ERROR, "Injector in interface is unsupported", elem.getElement());
|
||||
}
|
||||
|
||||
if (!elem.getAt().getBoolean("remap", true)) {
|
||||
if (!elem.shouldRemap()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ final class AnnotatedMixins implements IMixinAnnotationProcessor, ITokenProvider
|
||||
}
|
||||
|
||||
private boolean shouldRemap(AnnotatedMixin mixinClass, AnnotationHandle annotation) {
|
||||
return mixinClass.remap() && annotation.getBoolean("remap", true);
|
||||
return annotation.getBoolean("remap", mixinClass.remap());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user