Couldn't render entity ClassCastException
plaguewolf opened this issue ยท 2 comments
im running quite a few mods, 256 at last count, but i believe ive narrowed down the source of a bug that has been persisting for the last few days since i updated/changed things.
heres the relevant error thrown, or rather one of them, as my log was simply spammed to hell by practically every entity over a 30 minute period.
its important to note, this didnt initially cause a cash, and in fact doesnt start happening until some time into a new world, about long enough for mystcraft to finish instability profiling.
i think, and im no expert, that its a problem with all of, or one or the other, galacticraft/mekanism, in regards to being used alongside PlayerAPI/RenderPlayerAPI/RenderPlayerAPIEnhancer.
[09:34:38] [Client thread/ERROR]: Couldn't render entity
java.lang.ClassCastException: net.minecraft.entity.monster.EntitySkeleton cannot be cast to net.minecraft.entity.player.EntityPlayer
at micdoodle8.mods.galacticraft.core.client.model.ModelPlayerBaseGC.afterSetRotationAngles(ModelPlayerBaseGC.java:283) ~[ModelPlayerBaseGC.class:?]
at api.player.model.ModelPlayerAPI.setRotationAngles(Unknown Source) ~[ModelPlayerAPI.class:?]
at api.player.model.ModelPlayerAPI.setRotationAngles(Unknown Source) ~[ModelPlayerAPI.class:?]
at api.player.model.ModelPlayer.func_78087_a(Unknown Source) ~[ModelPlayer.class:?]
at mekanism.client.render.ModelCustomArmor$GlowArmor.func_78088_a(ModelCustomArmor.java:256) ~[ModelCustomArmor$GlowArmor.class:?]
at net.minecraft.client.renderer.entity.RendererLivingEntity.func_76986_a(RendererLivingEntity.java:162) [boh.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.func_76986_a(SourceFile:23) [bok.class:?]
at net.minecraft.client.renderer.entity.RenderBiped.func_76986_a(RenderBiped.java:164) [bnw.class:?]
at net.minecraft.client.renderer.entity.RenderBiped.func_76986_a(RenderBiped.java:361) [bnw.class:?]
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:293) [bnn.class:?]
at net.minecraft.client.renderer.entity.RenderManager.func_147936_a(RenderManager.java:271) [bnn.class:?]
at net.minecraft.client.renderer.entity.RenderManager.func_147937_a(RenderManager.java:244) [bnn.class:?]
at net.minecraft.client.renderer.RenderGlobal.func_147589_a(RenderGlobal.java:471) [bma.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1224) [blt.class:?]
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1011) [blt.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Unknown Source) [bao.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Unknown Source) [bao.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:310) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:394) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:170) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:54) [NewLaunch.jar:?]
It appears that GlowArmor is assuming that the wearer is a player, calling a player render method. I could be wrong, so I'm happy to help if the issue is on my end.
i think ive found the culprit for this, i was using renderplayerAPI enhancer, in the hopes that it would increase compatibility between mods that have custom armor renderers, and things like iChuns Morph.
my pack uses smart moving and MB battlegear2, and morph dislikes smart moving, and galacticraft/mekanism and a few others have custom armor rendering that doesnt play nice with smart moving's modifications to entity player, or at least that was the case, i vaguely remember reading somewhere that you micdoodle had looked into smart moving compatability.
however removing renderplayerAPI enhancer has fixed this issue, as what was happening was;
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: ========================================
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: The mod "Render Player API Enhancer" version 1.4 is active!
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: ----------------------------------------
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: Render Player API Enhancer will violently force ALL classes that:
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: * extend 'net.minecraft.client.model.ModelBiped' and
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: * have canonical names that match at least one 'armor' pattern
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: to use Render Player API.
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: ----------------------------------------
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: This can fix various incompatibilities between:
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: * player animation changing mods and
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: * player armor model adding mods.
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: This can also screw everything up, so use with caution.
[12:58:33] [main/WARN] [RenderPlayerAPIEnhancer]: ========================================
then later;
[12:59:28] [Client thread/INFO] [RenderPlayerAPIEnhancer]: Render Player API Enhancer enhances class 'mekanism.client.render.ModelCustomArmor' to extend class 'api.player.model.ModelPlayer' instead of class 'net.minecraft.client.model.ModelBiped'
and even later;
[13:21:07] [Client thread/INFO] [RenderPlayerAPIEnhancer]: Render Player API Enhancer enhances class 'mekanism.client.render.ModelCustomArmor$GlowArmor' to extend class 'api.player.model.ModelPlayer' instead of class 'net.minecraft.client.model.ModelBiped'
[13:21:07] [Client thread/INFO] [RenderPlayerAPIEnhancer]: Render Player API Enhancer modifies constructor 'mekanism.client.render.ModelCustomArmor$GlowArmor(F)V'
[13:21:07] [Client thread/INFO] [RenderPlayerAPIEnhancer]: Render Player API Enhancer leaves method 'mekanism.client.render.ModelCustomArmor$GlowArmor.func_78088_a(Lnet/minecraft/entity/Entity;FFFFFF)V' untouched because it calls its super method
[13:21:07] [Client thread/INFO] [RenderPlayerAPIEnhancer]: Render Player API Enhancer leaves super method reference 'func_78088_a(Lnet/minecraft/entity/Entity;FFFFFF)V' in 'mekanism.client.render.ModelCustomArmor$GlowArmor.func_78088_a(Lnet/minecraft/entity/Entity;FFFFFF)V' untouched because its local implementation does call its super method