mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-23 04:57:58 +01:00
Fixed Vex overlays not being aligned to its body
This commit is contained in:
parent
7d4c7ede88
commit
06c608acba
2 changed files with 4 additions and 8 deletions
|
@ -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());
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue