I'm targeting a non-static nested class, e.g.
package whatever;
class Outer {
public int x;
class Inner {
public void foo();
}
}
And I would like to write a SpongePowered Mixin for the inner class that refers to a field of the outer class, e.g.
@Mixin(targets = "whatever.Outer$Inner")
class InnerMixin {
@Overwrite
public void foo() {
System.out.println(Outer.this.x); //This doesn't work
}
}
How can I do this?