Fixed Vex overlays not being aligned to its body

This commit is contained in:
Sollace 2018-04-29 18:07:44 +02:00
parent 7d4c7ede88
commit 06c608acba
2 changed files with 4 additions and 8 deletions

View file

@ -20,11 +20,13 @@ public abstract class LayerOverlayBase<T extends EntityLiving> 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());

View file

@ -11,19 +11,13 @@ public class LayerPonyStrayOverlay extends LayerOverlayBase<EntityStray> {
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;