mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed positioning of passengers (parrots)
This commit is contained in:
parent
bcfed6cc84
commit
e7cb03aa35
2 changed files with 4 additions and 2 deletions
|
@ -55,9 +55,10 @@ public class PassengerFeature<
|
||||||
) {
|
) {
|
||||||
matrices.push();
|
matrices.push();
|
||||||
getContextModel().transform(state, BodyPart.BACK, matrices);
|
getContextModel().transform(state, BodyPart.BACK, matrices);
|
||||||
|
getContextModel().body.rotate(matrices);
|
||||||
matrices.translate(
|
matrices.translate(
|
||||||
left ? 0.25F : -0.25F,
|
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));
|
matrices.multiply(RotationAxis.NEGATIVE_Z.rotationDegrees(left ? -5 : 5));
|
||||||
parrotState.age = state.age;
|
parrotState.age = state.age;
|
||||||
|
|
|
@ -298,12 +298,13 @@ public enum PonyTransformation {
|
||||||
riderOffset = new Vec3d(rX, rY, rZ);
|
riderOffset = new Vec3d(rX, rY, rZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public Vec3d getRiderOffset() {
|
public Vec3d getRiderOffset() {
|
||||||
return riderOffset;
|
return riderOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void translateForRider(MatrixStack stack) {
|
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);
|
public abstract void transform(ModelAttributes attributes, BodyPart part, MatrixStack stack);
|
||||||
|
|
Loading…
Reference in a new issue