Fix vindicator's metadata not updating, causing its held item to be misplaced

This commit is contained in:
Matthew Messinger 2017-06-13 05:09:55 -04:00
parent d330cfd3e8
commit 52da7f800b
5 changed files with 8 additions and 9 deletions

View file

@ -70,7 +70,7 @@ public class ModelIllagerPony extends ModelPlayerPony {
}
}
public ModelRenderer getArmForSide(EnumHandSide side) {
return super.getArmForSide(side);
public ModelRenderer getArm(EnumHandSide side) {
return metadata.hasMagic() ? side == EnumHandSide.LEFT ? this.unicornArmLeft : this.unicornArmRight : this.getArmForSide(side);
}
}

View file

@ -29,7 +29,7 @@ public class RenderPonyEvoker extends RenderPonyMob<EntityEvoker> {
}
protected void translateToHand(EnumHandSide p_191361_1_) {
((ModelIllagerPony) this.getRenderer().getMainModel()).getArmForSide(p_191361_1_).postRender(0.0625F);
((ModelIllagerPony) this.getRenderer().getMainModel()).getArm(p_191361_1_).postRender(0.0625F);
}
});
}

View file

@ -31,7 +31,7 @@ public class RenderPonyIllusionIllager extends RenderPonyMob<EntityIllusionIllag
}
protected void translateToHand(EnumHandSide p_191361_1_) {
((ModelIllagerPony) this.getRenderer().getMainModel()).getArmForSide(p_191361_1_).postRender(0.0625F);
((ModelIllagerPony) this.getRenderer().getMainModel()).getArm(p_191361_1_).postRender(0.0625F);
}
});
}

View file

@ -52,9 +52,7 @@ public abstract class RenderPonyMob<T extends EntityLiving> extends RenderLiving
this.playerModel.getModel().isSleeping = false;
ResourceLocation loc = getEntityTexture(entity);
if (loc != null) {
this.playerModel.apply(MineLittlePony.getInstance().getManager().getPonyFromResourceRegistry(loc).metadata);
}
if (MineLittlePony.getConfig().showscale) {
this.shadowSize = 0.4F;

View file

@ -33,7 +33,7 @@ public class RenderPonyVindicator extends RenderPonyMob<EntityVindicator> {
@Override
protected void translateToHand(EnumHandSide side) {
((ModelIllagerPony) this.getRenderer().getMainModel()).getArmForSide(side).postRender(0.0625F);
((ModelIllagerPony) this.getRenderer().getMainModel()).getArm(side).postRender(0.0625F);
}
});
}
@ -45,6 +45,7 @@ public class RenderPonyVindicator extends RenderPonyMob<EntityVindicator> {
@Override
protected void preRenderCallback(EntityVindicator entitylivingbaseIn, float partialTickTime) {
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);
}