I am not sure why this works without a manual cast but the EntityRenderersEvent#AddLayers method gives you a LivingEntityRenderer<? extends Player, ? extends EntityModel<? extends Player>> which is not necessarily is of type PlayerRenderer. This will cause problems if mods want to render the player with a different renderer, like https://github.com/TeamLapen/Werewolves/issues/177
Mod Loader
Forge-47.2.0
Mod version
goety-2.5.6.2
Issue description
ClassCastException when adding layer to PlayerRenderer
https://github.com/Polarice3/Goety-2/blob/a9a5e731bb1d1784cf9d7fbd8893beff2bef8057/src/main/java/com/Polarice3/Goety/init/ClientInitEvents.java#L112-L119
I am not sure why this works without a manual cast but the
EntityRenderersEvent#AddLayers
method gives you aLivingEntityRenderer<? extends Player, ? extends EntityModel<? extends Player>>
which is not necessarily is of typePlayerRenderer
. This will cause problems if mods want to render the player with a different renderer, like https://github.com/TeamLapen/Werewolves/issues/177Link or Post Log Files
https://paste.gg/p/anonymous/39e53399f8734c18a1722694ac4162ff
Steps to reproduce
No response
Additional information
No response