mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Rename 'translateToHand' to better reflect what it does
This commit is contained in:
parent
13ba3379c9
commit
b00b2745e1
4 changed files with 12 additions and 9 deletions
|
@ -65,7 +65,7 @@ public class LayerHeldPonyItem<T extends EntityLivingBase> extends AbstractPonyL
|
|||
private void renderHeldItem(T entity, ItemStack drop, TransformType transform, EnumHandSide hand) {
|
||||
if (!drop.isEmpty()) {
|
||||
GlStateManager.pushMatrix();
|
||||
translateToHand(hand);
|
||||
postRenderArm(hand);
|
||||
|
||||
if (entity.isSneaking()) {
|
||||
GlStateManager.translate(0, 0.2F, 0);
|
||||
|
@ -97,14 +97,17 @@ public class LayerHeldPonyItem<T extends EntityLivingBase> extends AbstractPonyL
|
|||
return model instanceof AbstractPonyModel && ((AbstractPonyModel) model).metadata.hasMagic();
|
||||
}
|
||||
|
||||
protected void translateToHand(EnumHandSide hand) {
|
||||
/**
|
||||
* Renders the main arm
|
||||
*/
|
||||
protected void postRenderArm(EnumHandSide side) {
|
||||
AbstractPonyModel thePony = ((IRenderPony) getRenderer()).getPlayerModel().getModel();
|
||||
if (thePony.metadata.hasMagic()) {
|
||||
ModelPlayerPony playerModel = (ModelPlayerPony) thePony;
|
||||
ModelRenderer unicornarm = hand == EnumHandSide.LEFT ? playerModel.unicornArmLeft : playerModel.unicornArmRight;
|
||||
ModelRenderer unicornarm = side == EnumHandSide.LEFT ? playerModel.unicornArmLeft : playerModel.unicornArmRight;
|
||||
unicornarm.postRender(0.0625F);
|
||||
} else {
|
||||
((ModelBiped) getRenderer().getMainModel()).postRenderArm(0.0625F, hand);
|
||||
((ModelBiped) getRenderer().getMainModel()).postRenderArm(0.0625F, side);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ public class RenderPonyEvoker extends RenderPonyMob<EntityEvoker> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void translateToHand(EnumHandSide hand) {
|
||||
((ModelIllagerPony) getRenderer().getMainModel()).getArm(hand).postRender(0.0625F);
|
||||
protected void postRenderArm(EnumHandSide side) {
|
||||
((ModelIllagerPony) getRenderer().getMainModel()).getArm(side).postRender(0.0625F);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ public class RenderPonyIllusionIllager extends RenderPonyMob<EntityIllusionIllag
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void translateToHand(EnumHandSide hand) {
|
||||
((ModelIllagerPony) getRenderer().getMainModel()).getArm(hand).postRender(0.0625F);
|
||||
protected void postRenderArm(EnumHandSide side) {
|
||||
((ModelIllagerPony) getRenderer().getMainModel()).getArm(side).postRender(0.0625F);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class RenderPonyVindicator extends RenderPonyMob<EntityVindicator> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void translateToHand(EnumHandSide side) {
|
||||
protected void postRenderArm(EnumHandSide side) {
|
||||
((ModelIllagerPony) getRenderer().getMainModel()).getArm(side).postRender(0.0625F);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue