Additional check for hiding capes
pupnewfster opened this issue ยท 7 comments
So the other day someone opened a feature request on Mekanism to add support for hiding Wavy Capes when we hide the normal cape (such as for our custom elytra). I am opening this issue though as I believe it would be better suited on Wavy Capes' end as in Mekanism we just set the cape/cloak to not render if we don't want it visible.
https://github.com/mekanism/Mekanism/blob/1.19.x/src/main/java/mekanism/client/ClientTickHandler.java#L365-L366 https://github.com/mekanism/Mekanism/blob/1.19.x/src/main/java/mekanism/client/ClientTickHandler.java#L355
The reason I think it would be better to be on Wavy Capes' end is that I believe other mods likely would disable the vanilla cape in a similar way to us and then Wavy Capes can just support all of them out of the box. I believe all that should be needed would be to add a check here for !getParentModel().cloak.visible
(it would require either an AT or a mixin to read the value of the cloak
field), but then should natively support any mods that try and hide the cape in this way.
Yeah, from a brief skim it seemed like you just skipped the entire vanilla rendering. Mainly just suggesting you check the cloak's model visibility in your rendering as well just in case other mods (like Mekanism) change it as their way to attempt to hide capes from rendering at specific times. Even if with just Wavy Capes it will always return that it is visible.
I can look into it. I register my own RenderLayer and cancel calls to the vanilla renderCape method, so the cloaks model visibility is not changed from my end. Could also result in unintended side effects with other mods.
Hm, private final ModelPart cloak;
of cause the cloak is private, because stuff can't be easy.
Good to hear, didn't end up testing myself as I guess I misunderstood your comment about the build being done and assumed you meant that CI would upload a new version to CF or modrinth.
I'm currently working on setting up the CI to do that(on release, not on every change), because I'm going insane uploading mod files for fabric and forge to Curseforge and Modrinth.