You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IntelliJ IDEA 2023.3.4 (Ultimate Edition) Build #IU-233.14475.28
Operating System
Linux
Target platform
Mixins
Description of the bug
After applying the suggested access widener (AW) by MC-dev on members of outer class it stops suggesting to apply the AW. When I apply an AW to an inner class or the members of the inner class, MC-dev will keep suggesting to apply the AW.
Somewhat minimal code example to make clear what I mean:
// MC-dev suggests to AW ItemStatsListWidget, specifying the internal name results in mixin saying I can use the class Ref instead bc it is already public@Mixin(StatsScreen.ItemStatsListWidget.class)
classItemStatsListWidgetMixin {
@Shadow@FinalStatsScreenf_2839217;
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/stat/PlayerStats;get(Lnet/minecraft/stat/Stat;)I")
)
publicintinit1(PlayerStatsinstance, Statstat) {
// Stats is a member on the outer class that is accessed through a synthetic field inside the inner class and this works fine and MC-dev doesn't keep suggesting to apply the AW after you applied it.return ((IPlayerStats) f_2839217.stats).bismuthServer$getLongStat(stat) > 0L ? 1 : 0;
}
}
@Mixin(targets = "net/minecraft/client/gui/screen/StatsScreen$ItemStatsListWidget$1")
classStatComparator {
@Final@Shadow// Outer classStatsScreenf_5153485;
@Final@Shadow// Inner class// synthetic field, MC-dev suggests to AW ItemStatsListWidgetStatsScreen.ItemStatsListWidgetf_7207520;
@Inject(method = "compare(Lnet/minecraft/stat/ItemStat;Lnet/minecraft/stat/ItemStat;)I", at = @At(value = "INVOKE", target = "Lnet/minecraft/stat/PlayerStats;get(Lnet/minecraft/stat/Stat;)I"), cancellable = true)
publicvoidcompare(ItemStatitemStat, ItemStatitemStat2, CallbackInfoReturnable<Integer> cir, @Local(ordinal = 0) Statstat, @Local(ordinal = 1) Statstat2, @Local(ordinal = 0) inti, @Local(ordinal = 1) intj) {
// Access of member on outerclass is fine (and MC-dev only suggests AW till you apply it) : f_5153485.stats;
// Access of member on inner class MC-dev keeps suggesting to apply the AWf_7207520.f_2401102;
}
}
My access widener file:
accessWidener v2 named
accessible field net/minecraft/client/gui/screen/StatsScreen stats Lnet/minecraft/stat/PlayerStats;
accessible class net/minecraft/client/gui/screen/StatsScreen$ItemStatsListWidget
accessible class net/minecraft/client/gui/screen/StatsScreen$AbstractStatsListWidget
accessible field net/minecraft/client/gui/screen/StatsScreen$AbstractStatsListWidget f_2401102 I
The text was updated successfully, but these errors were encountered:
Minecraft Development for IntelliJ plugin version
2023.3-1.7.3
IntelliJ version
IntelliJ IDEA 2023.3.4 (Ultimate Edition) Build #IU-233.14475.28
Operating System
Linux
Target platform
Mixins
Description of the bug
After applying the suggested access widener (AW) by MC-dev on members of outer class it stops suggesting to apply the AW. When I apply an AW to an inner class or the members of the inner class, MC-dev will keep suggesting to apply the AW.
Somewhat minimal code example to make clear what I mean:
My access widener file:
The text was updated successfully, but these errors were encountered: