Skip to content

Commit

Permalink
Fix mods using static vagueness
Browse files Browse the repository at this point in the history
Whilst SpongePowered#415 is generating things more correctly, there are mods (such as Better End) which rely on the current behaviour
  • Loading branch information
Chocohead committed Jun 16, 2021
1 parent 2731d9d commit 0da59cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void checkModifiers() {
if (!this.targetIsStatic) {
throw new InvalidAccessorException(this.info, String.format("%s is invalid. Accessor method is static but the target is not.", this.info));
} else {
LogManager.getLogger("mixin").info("{} could be static as its target is", this.info);
LogManager.getLogger("mixin").info("{} should be static as its target is", this.info);
}
}
}
Expand All @@ -72,7 +72,7 @@ protected void checkModifiers() {
*/
protected final MethodNode createMethod(int maxLocals, int maxStack) {
MethodNode method = this.info.getMethod();
MethodNode accessor = new MethodNode(ASM.API_VERSION, (method.access & ~Opcodes.ACC_ABSTRACT) | Opcodes.ACC_SYNTHETIC | (this.targetIsStatic ? Opcodes.ACC_STATIC : 0), method.name,
MethodNode accessor = new MethodNode(ASM.API_VERSION, (method.access & ~Opcodes.ACC_ABSTRACT) | Opcodes.ACC_SYNTHETIC, method.name,
method.desc, null, null);
accessor.visibleAnnotations = new ArrayList<AnnotationNode>();
accessor.visibleAnnotations.add(this.info.getAnnotation());
Expand Down

0 comments on commit 0da59cf

Please sign in to comment.