[Bug] ClassCastException on rendering PlayerEntity in 3rd Person
Cheaterpaul opened this issue ยท 3 comments
Versions
- Minecraft: 1.16.5
- Forge: 36.2.0
- musketmod-1.16.5-forge-1.4.1
- Werewolves: 1.8-0.5.6
- Vampirism: 1.8.4
For reference: TeamLapen/Werewolves#65
I have gotten a crash-report from someone who uses this mod and my werewolves mod together. This is caused because i render the player with a werewolf model instead of the player model, resulting in a ClassCastException here
While testing i noticed that the RenderLivingEvent.Pre
does not care about the generic parameter (it is too costly for forge to fire generic aware events) thus every eventhandler receives events for all entities and all models.
It may seem to be unnecessary for checking if the model is a PlayerModel if the entity is a player, but is it possible.
thanks for such detailed report) i'll add a necessary type check and review other places that may have similar assumptions