From b00b2745e1883df93e18457a46cc20e92c5547fb Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 27 Apr 2018 17:55:30 +0200 Subject: [PATCH] Rename 'translateToHand' to better reflect what it does --- .../render/layer/LayerHeldPonyItem.java | 11 +++++++---- .../render/ponies/RenderPonyEvoker.java | 4 ++-- .../render/ponies/RenderPonyIllusionIllager.java | 4 ++-- .../render/ponies/RenderPonyVindicator.java | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java b/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java index 1af8aec1..a6488281 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java @@ -65,7 +65,7 @@ public class LayerHeldPonyItem 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 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); } } diff --git a/src/main/java/com/minelittlepony/render/ponies/RenderPonyEvoker.java b/src/main/java/com/minelittlepony/render/ponies/RenderPonyEvoker.java index 961f3ead..b27a14bd 100644 --- a/src/main/java/com/minelittlepony/render/ponies/RenderPonyEvoker.java +++ b/src/main/java/com/minelittlepony/render/ponies/RenderPonyEvoker.java @@ -30,8 +30,8 @@ public class RenderPonyEvoker extends RenderPonyMob { } @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); } }); } diff --git a/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java b/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java index d9076f7d..c8c27f77 100644 --- a/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java +++ b/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java @@ -33,8 +33,8 @@ public class RenderPonyIllusionIllager extends RenderPonyMob { } @Override - protected void translateToHand(EnumHandSide side) { + protected void postRenderArm(EnumHandSide side) { ((ModelIllagerPony) getRenderer().getMainModel()).getArm(side).postRender(0.0625F); } });