mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 04:17:36 +00:00
Fix ModelRenderer cast for Child Models causing render corruption
This commit is contained in:
1 parent
d4a62b1334
commit
97c97cf939
1 file changed
+10
-5
@@ -112,7 +112,7 @@ public abstract class MixinModelRenderer {
|
||||
}
|
||||
if (ClientEventHandler.renderingPlayer != null && Client.playerAnimations.containsKey(ClientEventHandler.renderingPlayer.getUniqueID())) {
|
||||
animData = Client.playerAnimations.get(ClientEventHandler.renderingPlayer.getUniqueID());
|
||||
EnumAnimationPart mainPartType = this.getPlayerPartType((ModelRenderer) (Object) this);
|
||||
EnumAnimationPart mainPartType = null;
|
||||
EnumAnimationPart pivotEqualPart = null;
|
||||
if (mainPartType == null) {
|
||||
pivotEqualPart = this.pivotEqualPart((ModelRenderer) (Object) this);
|
||||
@@ -161,7 +161,9 @@ public abstract class MixinModelRenderer {
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,7 +176,9 @@ public abstract class MixinModelRenderer {
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,10 +211,11 @@ public abstract class MixinModelRenderer {
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user