question regarding package private classes
PssbleTrngle opened this issue ยท 6 comments
Hi, this is a bit of a weird request and I totally understand if you don't feel like doing it.
I am trying to develop a mod, which would allow the hunger bar icons to be overridden per player depending on specific conditions.
It would be really nice to have support for AppleSkin, but in order for me to accomplish that, I would have to mixin to some of it's classes, which right now is a bit difficult, because some inner classes it uses during the rendering process are package-private.
I guess there is no actual reason for them to be non-public, other than them not being useful to anyone simply using the API, but it would make things a lot easier for me if they were. The affected classes are TooltipOverlayHandler$FoodTooltipRenderer
, TooltipOverlayHandler$TextureOffsets
and HudOverlayHandler$RenderOverlayType
.
Have you taken a look at the available API? Is there anything that you need that wouldn't be possible using it?
Fabric:
https://github.com/squeek502/AppleSkin/tree/1.19-fabric#for-mod-developers
https://github.com/squeek502/AppleSkin/tree/1.19-fabric/java/squeek/appleskin/api
Forge:
https://github.com/squeek502/AppleSkin/tree/1.19-forge#for-mod-developers
https://github.com/squeek502/AppleSkin/tree/1.19-forge/java/squeek/appleskin/api
I think their is no event to modify the texture & offets values passed to the blit
function. An event for that would also be a great possible solution. I am also open to create a fork and implement it in a PR
I want to dynamically replace the texture(s) that are being used in the overlay & hud render. In order for the textures to not have to be in the same format as the original ones, it would also be nice if the TextureOffsets
that are being used for the rendering could also be overwritten, but that's not absolutely necessary