Fix leg position when lying down #259

This commit is contained in:
Sollace 2024-05-05 19:00:02 +01:00
parent f0ee97bce0
commit 4963796c84
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -31,7 +31,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
public static final Pivot ORIGIN = new Pivot(0, 0, 0); public static final Pivot ORIGIN = new Pivot(0, 0, 0);
public static final Pivot HEAD_SNEAKING = new Pivot(0, 6, -2); public static final Pivot HEAD_SNEAKING = new Pivot(0, 6, -2);
public static final Pivot HEAD_SLEEPING = new Pivot(1, 2, 0);
public static final Pivot BODY_SNEAKING = new Pivot(0, 7, -4); public static final Pivot BODY_SNEAKING = new Pivot(0, 7, -4);
public static final Pivot BODY_RIDING = new Pivot(0, 1, 4); public static final Pivot BODY_RIDING = new Pivot(0, 1, 4);
public static final Pivot FONT_LEGS_SLEEPING = new Pivot(0, 2, 6); public static final Pivot FONT_LEGS_SLEEPING = new Pivot(0, 2, 6);
@ -195,8 +194,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
rightLeg.pitch = MathUtil.Angles._90_DEG; rightLeg.pitch = MathUtil.Angles._90_DEG;
leftLeg.pitch = MathUtil.Angles._90_DEG; leftLeg.pitch = MathUtil.Angles._90_DEG;
HEAD_SLEEPING.set(head);
FONT_LEGS_SLEEPING.add(rightArm); FONT_LEGS_SLEEPING.add(rightArm);
FONT_LEGS_SLEEPING.add(leftArm); FONT_LEGS_SLEEPING.add(leftArm);
BACK_LEGS_SLEEPING.add(rightLeg); BACK_LEGS_SLEEPING.add(rightLeg);
@ -594,11 +591,8 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180)); stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180));
} }
boolean crouching = attributes.isCrouching;
if (attributes.isLyingDown && !attributes.isSleeping) { if (attributes.isLyingDown && !attributes.isSleeping) {
stack.translate(0, 1.35F, 0); stack.translate(0, 1.35F, 0);
attributes.isCrouching = sneaking;
} }
if (attributes.isHorsey) { if (attributes.isHorsey) {
@ -612,7 +606,5 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
} }
PonyTransformation.forSize(getSize()).transform(this, part, stack); PonyTransformation.forSize(getSize()).transform(this, part, stack);
attributes.isCrouching = crouching;
} }
} }