Buuz135 / SushiGoCrafting

MIT License
8 stars 13 forks source link

PlayerRenderer ClassCastException #44

Closed Cheaterpaul closed 6 months ago

Cheaterpaul commented 7 months ago

Minecraft: 1.20.1 NeoForge: 47.1.79 Titanium: 3.8.25 Sushi Go Crafting: 0.5.1 Vampirism: 1.20.1-1.10.6 Werewolves: 2.0.0.0-beta2

Crash Report: https://pastebin.com/raw/Cgq7BqgN

https://github.com/Buuz135/SushiGoCrafting/blob/97db4c323e5ca6110e21e0c9c5c5c09a2c50f2d9/src/main/java/com/buuz135/sushigocrafting/client/ClientProxy.java#L44-L49

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