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;