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
This might simply be a matter of not finding the right documentation, if so I would greatly appreciate if you can point me to it.
Problem:
Simply attempting to access an inner class while in a mixin, for example
ModelLoader.ModelDefinition x = new ModelLoader.ModelDefinition(myUnbakedModelList, myValues);
The compiler message is: "net.minecraft.client.render.model.ModelLoader.ModelDefinition' has private access in 'net.minecraft.client.render.model.ModelLoader"
Attempted solutions and their problems:
Add @shadow static class ModelDefinition; to the mixin:
Compiler message: "Inner classes are only allowed if they are also @mixin classes"
Create a Mixin for the inner class: @Mixin(ModelLoader.ModelDefinition.class) public class ModelLoaderMixinModelDefinition { }
-Get the same "private access" error on ModelDefinition. The error message in (1) seems to indicate that "there is a way" to make a mixin for an inner class but it is not clear what that is.
Conclusion:
A) If there is already mixin support for accessing inner classes, some documentation is necessary.
B) If there is no mixing support for accessing inner classes, it might be a good idea to add the functionality.
The text was updated successfully, but these errors were encountered:
However, depending on how much you need to access, there's a good chance you will still want to use an access transformer/widener to make the inner class public first. For example, you still can't declare any variables with that class as a type since you aren't supposed to have access to it.
This might simply be a matter of not finding the right documentation, if so I would greatly appreciate if you can point me to it.
Problem:
Attempted solutions and their problems:
@Mixin(ModelLoader.ModelDefinition.class) public class ModelLoaderMixinModelDefinition { }
-Get the same "private access" error on ModelDefinition. The error message in (1) seems to indicate that "there is a way" to make a mixin for an inner class but it is not clear what that is.
Conclusion:
A) If there is already mixin support for accessing inner classes, some documentation is necessary.
B) If there is no mixing support for accessing inner classes, it might be a good idea to add the functionality.
The text was updated successfully, but these errors were encountered: