[1.18.2 / FORGE] Disabling body parts render do not disable curios render overlay.
KKotik opened this issue ยท 4 comments
- Curios: 5.0.6.3
- Forge/Fabric: Forge
Observed Behavior: Curio items on player model do not become invisible if other mod is making body part invisible.
Expected Behavior: To turn body part overlay invisible as well.
Steps to Reproduce:
- Download both Curios and https://www.curseforge.com/minecraft/mc-mods/first-person-model
- Change configs of first person model to use vanilla hands.
- Look down on your body from first person view.
More info and visual examples can be found here as well as other mod author response to this issue: tr7zw/FirstPersonModel#260
Crash Log: None.
Want add same behavior happening with cape hiding mods when you equip elytra for example in curio slot. I think this is the same thing and different situation, so it might be helpful.
Here one of this mods: https://www.curseforge.com/minecraft/mc-mods/waveycapes
I don't think this is something I can reasonably accommodate for. The issue is that there isn't a real concept of "body parts" as it relates to Curios rendering. All Curios does is look for items in the slots and then render them if they have a renderable component. That's all. It has no context for which body parts belong to which slots, nor should it since slots are not always related to a body part.
The only way I can think of to do this on my end is to check for specific slot identifiers related to body parts, such as "head" for the head model or "hands" for the hand model in this case, and to stop rendering when that specific part is invisible. However, I don't think that's actually a good idea. Just because an item can go into a slot called "head" or "hands" does not necessarily mean it actually renders on the head or hand, this is specifically an implementation detail. If I did that and some mod needed to render something in those slots that did not correlate with the visibility of those particular body parts, it would lead to some unexpected behavior that the mod would not have a reasonable way to address.
That being said, I don't think this is something First Person Model can really reasonably address on their end either.
I think the most straightforward way is for mods that implement models that specifically render on body parts like that to check for the visibility themselves, since whether or not it should render in those circumstances is an implementation detail that should be decided by the mod that provides the model.
Want add same behavior happening with cape hiding mods when you equip elytra for example in curio slot.
Are you saying that capes are/aren't showing up properly when equipping elytras into a curio slot? If so, that's probably something that should be reported to the Curious Elytra issue tracker instead.
I think the most straightforward way is for mods that implement models that specifically render on body parts like that to check for the visibility themselves, since whether or not it should render in those circumstances is an implementation detail that should be decided by the mod that provides the model.
I'm not too familiar with Curios(didn't even know that there are ones that render things, since I haven't played any forge modpack for some time), but if I get this right, that thing rendered there is not from Curios itself, but a mod using Curios. So this issue should be moved to that mod to add a simple visibility check.
I could also look into applying the same "hack" to the arms as I do to the head, where the model offset gets pushed a few hundred blocks behind the player, so anything trying to render at the same place also gets moved out of sight. (only a band-aid solution, since then the other mod will still conflict with mods making body parts invisible)
In regards to WaveyCapes, I have curio support on my todo, just haven't got around to implementing it. Nothing for Curios to do there.
I'm not too familiar with Curios(didn't even know that there are ones that render things, since I haven't played any forge modpack for some time), but if I get this right, that thing rendered there is not from Curios itself, but a mod using Curios. So this issue should be moved to that mod to add a simple visibility check.
Yes, it's from a mod using Curios although I don't know which one. My proposed solution is indeed to have that mod, and any other mod that might have models like that, to add a visibility check since they would be the ones to know best when and where it's most appropriate to have those checks. And I made sure that the Curios rendering method has enough context for consumers to access the player model when applicable.