From 06c608acbaa6f900e6e105018f2cbe0254343b3a Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 29 Apr 2018 18:07:44 +0200 Subject: [PATCH] Fixed Vex overlays not being aligned to its body --- .../com/minelittlepony/render/layer/LayerOverlayBase.java | 4 +++- .../render/layer/LayerPonyStrayOverlay.java | 8 +------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/minelittlepony/render/layer/LayerOverlayBase.java b/src/main/java/com/minelittlepony/render/layer/LayerOverlayBase.java index 9b43fbcd..f887a8ca 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerOverlayBase.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerOverlayBase.java @@ -20,11 +20,13 @@ public abstract class LayerOverlayBase implements LayerR return true; } - protected void renderOverlay(T entity, float move, float swing, float ticks, float age, float headYaw, float headPitch, float scale) { + @Override + public void doRenderLayer(T entity, float move, float swing, float ticks, float age, float headYaw, float headPitch, float scale) { ModelBase overlayModel = getOverlayModel(); overlayModel.setModelAttributes(renderer.getMainModel()); overlayModel.setLivingAnimations(entity, move, swing, ticks); + overlayModel.setRotationAngles(move, swing, age, headYaw, headPitch, scale, entity); renderer.bindTexture(getOverlayTexture()); diff --git a/src/main/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java b/src/main/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java index cc809013..b58d5213 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java @@ -11,19 +11,13 @@ public class LayerPonyStrayOverlay extends LayerOverlayBase { public static final ResourceLocation STRAY_SKELETON_OVERLAY = new ResourceLocation("minelittlepony", "textures/entity/skeleton/stray_pony_overlay.png"); - private final ModelSkeletonPony overlayModel; + private final ModelSkeletonPony overlayModel = new ModelSkeletonPony(); public LayerPonyStrayOverlay(RenderLivingBase render) { super(render); - overlayModel = new ModelSkeletonPony(); overlayModel.init(0, 0.25F); } - @Override - public void doRenderLayer(EntityStray entity, float move, float swing, float ticks, float age, float headYaw, float headPitch, float scale) { - renderOverlay(entity, move, swing, ticks, age, headYaw, headPitch, scale); - } - @Override protected ModelBase getOverlayModel() { return overlayModel;