Issue with Real First Person Render and First Person Render mods
captain-qua opened this issue ยท 4 comments
When using this mod alongside Real First-Person Render or the similar mod First Person Render (they look to be essentially the same, both in general and how they display this issue), helmets in the Cosmetic Helmet slot are displayed on the player dummy used to create the body, and they rotate with the player's view. This can obscure a lot of the screen. Oddly enough, while helmets are rotated with the player's view, it seems like Pumpkins and Skulls on the player dummy don't rotate at all, which keeps them out of the way.
Everything still looks normal when in Third Person mode as well.
Some screenshots are attached showing the effect when wearing a helmet and looking forwards (no issue), when wearing a helmet and looking down (somewhat obscured), when wearing a helmet and looking up (no issue), and when wearing a helmet and looking at a 45 degree angle towards the ground (almost totally obscured). I've also attached a screenshot while wearing a skull and looking at a 45 degree angle towards the ground (no issue) and a screenshot while wearing the skull and looking straight down (the "chin" of the skull is visible, proving that it is rendering, just not rotated to follow the head).
Looking up with helmet (no issue):
Looking forwards with helmet (no issue):
Looking down with helmet (somewhat obscured):
Looking at a 45 degree downwards angle with helmet (almost completely obscured):
Looking at a 45 degree angle with a Skeleton Skull (no issue):
Proving that the Skeleton Skull is rendering, but doesn't rotate, and so can't get in the way:
If all headwear
You can disregard this last paragraph if I'm totally wrong, since I've never actually written a Minecraft mod, but just by looking through Real First-Person Render's Source, I believe the problem might be that the cosmetic headware ignores the playerModel.bipedHead.isHidden
and the playerModel.bipedHeadwear.isHidden
things, at Line 165 (and 166)?
I'd love if these could be fixed, so I could enjoy pretty armor, good defense, and an immersive first-person experience all at once. Thanks for your time!
Unfortunately, CosmeticArmorReworked achieves its goal by replacing armor pieces before a player render occur and restore them back right after the render (even if the render event is canceled), thus the cause described in your last paragraph isn't the case.
I'll look into this.
After looking through Real First-Person Render's source code you provided and related vanilla code (not thoroughly), the head, headwear and helmet layer do not get rotated in a first person render, and helmet layer is not easily accessible, thus RFPP is properly hiding head and headwear but, helmet layer is hidden through removing helmet item temporarily, which will get replaced by CosmeticArmorReworked before the render, causing the issue.
A possible fix for RFPP to implement would be using 1 (forge's access transformers) or 2 (java's reflection api) to gain access of layers and properly hide helmet layer instead of removing helmet item temporarily during the render. (there must be other ways of achieving the same goal, but these two is what i can think of at this moment)
There is not much i can do on my side.
The api provided in the latest version of CosmeticArmorReworked might also be used to workaround this issue by removing the helmet item in cos slots temporarily, but it could cause problems and it also needs to be done on RFPP side.