mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Fix vindicator's metadata not updating, causing its held item to be misplaced
This commit is contained in:
parent
d330cfd3e8
commit
52da7f800b
5 changed files with 8 additions and 9 deletions
|
@ -70,7 +70,7 @@ public class ModelIllagerPony extends ModelPlayerPony {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModelRenderer getArmForSide(EnumHandSide side) {
|
public ModelRenderer getArm(EnumHandSide side) {
|
||||||
return super.getArmForSide(side);
|
return metadata.hasMagic() ? side == EnumHandSide.LEFT ? this.unicornArmLeft : this.unicornArmRight : this.getArmForSide(side);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class RenderPonyEvoker extends RenderPonyMob<EntityEvoker> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void translateToHand(EnumHandSide p_191361_1_) {
|
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class RenderPonyIllusionIllager extends RenderPonyMob<EntityIllusionIllag
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void translateToHand(EnumHandSide p_191361_1_) {
|
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ public abstract class RenderPonyMob<T extends EntityLiving> extends RenderLiving
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doRender(T entity, double xPosition, double yPosition, double zPosition, float yaw,
|
public void doRender(T entity, double xPosition, double yPosition, double zPosition, float yaw,
|
||||||
float partialTicks) {
|
float partialTicks) {
|
||||||
double yOrigin = yPosition;
|
double yOrigin = yPosition;
|
||||||
if (entity.isSneaking()) {
|
if (entity.isSneaking()) {
|
||||||
yOrigin -= 0.125D;
|
yOrigin -= 0.125D;
|
||||||
|
@ -52,9 +52,7 @@ public abstract class RenderPonyMob<T extends EntityLiving> extends RenderLiving
|
||||||
this.playerModel.getModel().isSleeping = false;
|
this.playerModel.getModel().isSleeping = false;
|
||||||
|
|
||||||
ResourceLocation loc = getEntityTexture(entity);
|
ResourceLocation loc = getEntityTexture(entity);
|
||||||
if (loc != null) {
|
this.playerModel.apply(MineLittlePony.getInstance().getManager().getPonyFromResourceRegistry(loc).metadata);
|
||||||
this.playerModel.apply(MineLittlePony.getInstance().getManager().getPonyFromResourceRegistry(loc).metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MineLittlePony.getConfig().showscale) {
|
if (MineLittlePony.getConfig().showscale) {
|
||||||
this.shadowSize = 0.4F;
|
this.shadowSize = 0.4F;
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class RenderPonyVindicator extends RenderPonyMob<EntityVindicator> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void translateToHand(EnumHandSide side) {
|
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
|
@Override
|
||||||
protected void preRenderCallback(EntityVindicator entitylivingbaseIn, float partialTickTime) {
|
protected void preRenderCallback(EntityVindicator entitylivingbaseIn, float partialTickTime) {
|
||||||
|
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
|
||||||
GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);
|
GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue