Has your game started to crash with a black screen after you have applied custom animations to your custom Minecraft living entity or any other element using Java models?
Issue symptoms
The game window usually looks like this:
The crash log usually contains text similar to this:
Caused by: java.lang.IllegalArgumentException: Failed to create model for modid:model_name
at TRANSFORMER/minecraft@1.21.8/net.minecraft.client.renderer.entity.EntityRenderers.lambda$createEntityRenderers$2(EntityRenderers.java:39) ~[neoforge-21.8.31.jar%23212!/:?] {re:classloading,pl:accesstransformer:B}
at MC-BOOTSTRAP/it.unimi.dsi.fastutil@8.5.15/it.unimi.dsi.fastutil.objects.Object2ObjectMap.lambda$forEach$0(Object2ObjectMap.java:209) ~...
Caused by: java.lang.IllegalArgumentException: Cannot animate partName, which does not exist in model
at TRANSFORMER/minecraft@1.21.8/net.minecraft.client.animation.KeyframeAnimation.bake(KeyframeAnimation.java:34) ~[neoforge-21.8.31.jar%23212!/:?] {re:classloading}
...
How to fix this issue?
This Minecraft black screen issue originates from the fact that your animation (for the case above) is trying to animate partName, which does not exist in your model model_name.
To fix this issue, make sure your animations only reference parts that your model actually contains. If it is a custom model, those parts can be seen in your model code or in BlockBench UI if you used this software to make the model. Make sure to only reference parts by their exact name and only the parts the model you are trying to animate contains.