From 45c9d34f5d4929e4447193f9cbc6dc077c8c4b6b Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 22 Mar 2023 04:00:34 +0000 Subject: [PATCH] Fixed wing scale and rotation not being applied --- .../client/model/part/PonyWings.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/model/part/PonyWings.java b/src/main/java/com/minelittlepony/client/model/part/PonyWings.java index 878dbbac..f5af1e54 100644 --- a/src/main/java/com/minelittlepony/client/model/part/PonyWings.java +++ b/src/main/java/com/minelittlepony/client/model/part/PonyWings.java @@ -27,9 +27,20 @@ public class PonyWings implements IPart, MsonModel { @Override public void init(ModelView context) { pegasus = context.getModel(); + + float wingScale = context.getLocalValue("wing_scale", 1); // pegasi 1 / bats 1.3F + float walkingRotationSpeed = context.getLocalValue("walking_rotation_speed", 0.15F); // pegasi 0.15 / bats 0.05F + leftWing = context.findByName("left_wing"); rightWing = context.findByName("right_wing"); legacyWing = context.findByName("legacy_right_wing"); + + leftWing.wingScale = wingScale; + leftWing.walkingRotationSpeed = walkingRotationSpeed; + rightWing.wingScale = wingScale; + rightWing.walkingRotationSpeed = walkingRotationSpeed; + legacyWing.wingScale = wingScale; + legacyWing.walkingRotationSpeed = walkingRotationSpeed; } public Wing getLeft() { @@ -92,8 +103,8 @@ public class PonyWings implements IPart, MsonModel { protected final ModelPart extended; protected final ModelPart folded; - private float wingScale; - private float walkingRotationSpeed; + private float wingScale = 1; + private float walkingRotationSpeed = 0.15F; public Wing(ModelPart tree) { extended = tree.getChild("extended"); @@ -103,8 +114,6 @@ public class PonyWings implements IPart, MsonModel { @Override public void init(ModelView context) { pegasus = context.getModel(); - wingScale = context.getLocalValue("wing_scale", 1); // pegasi 1 / bats 1.3F - walkingRotationSpeed = context.getLocalValue("walking_rotation_speed", 0.15F); // pegasi 0.15 / bats 0.05F } public void rotateWalking(float swing) {