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
When you use a shadowed field in an anonymous class inside a mixin, it doesn't get remapped properly. This only happens when remapping from intermediary to named and thus only affects external mixins in a dev environment, such as those from mods in run/mods or dependencies.
Note the tests printed in the logs at startup. They all should be passing
Build this mod using the build task
Set up a new or open an old development environment.
Put the built jar from build/libs/ into run/mods/ on the other project.
Run minecraft in the other project.
Note that the test fails on Anonymous with a NoSuchFieldError.
(optional) Run the mod in a production environment.
Note that all tests pass.
Analysis
It works in the original dev environment because nothing is remapped, and it works in the production environment because it is properly remapped to intermediary.
Mixin remaps shadowed fields at runtime, but it misses the usages in the anonymous class, probably because it is in a different class file and mixin expects all usages to be in the mixin itself.
The text was updated successfully, but these errors were encountered:
Description
When you use a shadowed field in an anonymous class inside a mixin, it doesn't get remapped properly. This only happens when remapping from intermediary to named and thus only affects external mixins in a dev environment, such as those from mods in
run/mods
or dependencies.Reproducing
build
taskbuild/libs/
intorun/mods/
on the other project.Anonymous
with aNoSuchFieldError
.Analysis
It works in the original dev environment because nothing is remapped, and it works in the production environment because it is properly remapped to intermediary.
Mixin remaps shadowed fields at runtime, but it misses the usages in the anonymous class, probably because it is in a different class file and mixin expects all usages to be in the mixin itself.
The text was updated successfully, but these errors were encountered: