Polarice3 / Goety-2

Learn the secrets of Illager magics and master the dark arts.
https://www.curseforge.com/minecraft/mc-mods/goety
MIT License
4 stars 4 forks source link

PlayerRenderer ClassCastException #32

Closed Cheaterpaul closed 7 months ago

Cheaterpaul commented 8 months ago

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 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

Link or Post Log Files

https://paste.gg/p/anonymous/39e53399f8734c18a1722694ac4162ff

Steps to reproduce

No response

Additional information

No response

Polarice3 commented 8 months ago

Thanks for letting me know! I'll see to fixing this!

Polarice3 commented 7 months ago

Hopefully fixed in the latest updates!