Doctor Who - Regeneration

Doctor Who - Regeneration

318k Downloads

[1.16+] ClassCastException as the code expects a LivingEntity from the camera entity

iChun opened this issue ยท 1 comments

commented

Someone using Hats was getting this crash as Hats spoofs the camera position using a dummy entity when the Hats UI is being shown: https://pastebin.com/dJQK6fnc

As the field-type in MC is of Entity and not LivingEntity, the code should probably be doing an instanceof check here (rather than a null check): https://github.com/Suff99/Regeneration/blob/1.16/src/main/java/me/suff/mc/regen/handlers/ClientEvents.java#L222

Similar to what's done here: https://github.com/Suff99/Regeneration/blob/1.16/src/main/java/me/suff/mc/regen/handlers/ClientEvents.java#L141

commented

The joys of writing things on different days

I'll get this fixed as soon as I can