AppleSkin icon indicating copy to clipboard operation
AppleSkin copied to clipboard

question regarding package private classes

Open PssbleTrngle opened this issue 2 years ago • 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.

PssbleTrngle avatar Jun 07 '23 17:06 PssbleTrngle

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

squeek502 avatar Jun 07 '23 18:06 squeek502

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

PssbleTrngle avatar Jun 10 '23 08:06 PssbleTrngle

Could you describe what you're trying to do a bit more?

squeek502 avatar Jun 10 '23 08:06 squeek502

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

PssbleTrngle avatar Jun 10 '23 08:06 PssbleTrngle

If this is something I could help with a PR, just let me know

PssbleTrngle avatar Jul 02 '23 09:07 PssbleTrngle

Hi, been also a while since I though about this, but I've stumbled over it again and was wondering if you thought about it?

PssbleTrngle avatar Feb 05 '24 10:02 PssbleTrngle