We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 183cd7b commit c0fb393Copy full SHA for c0fb393
src/mixin/java/mcp/mobius/waila/mixin/SimpleTierMixin.java
@@ -23,7 +23,15 @@ public class SimpleTierMixin {
23
@Inject(method = "<init>", at = @At("TAIL"))
24
private void wthit_init(CallbackInfo ci) {
25
if (wthit_stackWalker == null) wthit_stackWalker = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE);
26
- IMixinService.INSTANCE.addTierInstance((Tier) this, wthit_stackWalker.getCallerClass());
+
27
+ var caller = wthit_stackWalker.walk(s -> s
28
+ .skip(2)
29
+ .map(StackWalker.StackFrame::getDeclaringClass)
30
+ .findFirst()
31
+ .orElse(null));
32
+ if (caller == null) caller = wthit_stackWalker.getCallerClass();
33
34
+ IMixinService.INSTANCE.addTierInstance((Tier) this, caller);
35
}
36
37
0 commit comments