From 8d385a320270704fae5c4883a7fd42d5e478de39 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 30 Apr 2024 19:11:48 +0100 Subject: [PATCH] Skeletons now lower their bow when not attacking. ;) --- .../client/model/entity/SkeleponyModel.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/model/entity/SkeleponyModel.java b/src/main/java/com/minelittlepony/client/model/entity/SkeleponyModel.java index 7da3aea1..5a27673a 100644 --- a/src/main/java/com/minelittlepony/client/model/entity/SkeleponyModel.java +++ b/src/main/java/com/minelittlepony/client/model/entity/SkeleponyModel.java @@ -9,6 +9,7 @@ import net.minecraft.util.Arm; import net.minecraft.util.Hand; import com.minelittlepony.api.model.MobPosingHelper; +import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.client.model.entity.race.AlicornModel; public class SkeleponyModel extends AlicornModel { @@ -58,11 +59,11 @@ public class SkeleponyModel extends AlicornModel { @Override protected void rotateLegs(float move, float swing, float ticks, T entity) { super.rotateLegs(move, swing, ticks, entity); - if (rightArmPose != ArmPose.EMPTY) { + if (rightArmPose != ArmPose.EMPTY && entity.isAttacking()) { rotateArmHolding(getArm(Arm.RIGHT), -1, getSwingAmount(), ticks); } - if (leftArmPose != ArmPose.EMPTY) { + if (leftArmPose != ArmPose.EMPTY && entity.isAttacking()) { rotateArmHolding(getArm(Arm.LEFT), -1, getSwingAmount(), ticks); } } @@ -72,8 +73,8 @@ public class SkeleponyModel extends AlicornModel { } @Override - public boolean hasMagic() { - return isUnicorn; + public Race getRace() { + return isUnicorn ? super.getRace() : Race.EARTH; } @Override