Fixed positioning of passengers (parrots)

This commit is contained in:
Sollace 2024-12-13 22:28:02 +01:00
parent bcfed6cc84
commit e7cb03aa35
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 4 additions and 2 deletions

View file

@ -55,9 +55,10 @@ public class PassengerFeature<
) {
matrices.push();
getContextModel().transform(state, BodyPart.BACK, matrices);
getContextModel().body.rotate(matrices);
matrices.translate(
left ? 0.25F : -0.25F,
state.isInSneakingPose ? -1.3F : -1.5F, 0.0F
state.isInSneakingPose ? -1.7F : -1.5F, 0
);
matrices.multiply(RotationAxis.NEGATIVE_Z.rotationDegrees(left ? -5 : 5));
parrotState.age = state.age;

View file

@ -298,12 +298,13 @@ public enum PonyTransformation {
riderOffset = new Vec3d(rX, rY, rZ);
}
@Deprecated
public Vec3d getRiderOffset() {
return riderOffset;
}
public void translateForRider(MatrixStack stack) {
stack.translate(riderOffset.x, riderOffset.y, riderOffset.z);
stack.translate(riderOffset.x, riderOffset.y / 16F, riderOffset.z);
}
public abstract void transform(ModelAttributes attributes, BodyPart part, MatrixStack stack);