Fixed unicorns not swinging their arms when their hands are empty

This commit is contained in:
Sollace 2018-04-30 10:31:14 +02:00
parent 3a8ac047b1
commit 51e5c9ddc5
2 changed files with 3 additions and 6 deletions

View file

@ -293,8 +293,6 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
if (swingProgress > -9990.0F && !isSleeping) { if (swingProgress > -9990.0F && !isSleeping) {
EnumHandSide mainSide = getMainHand(entity); EnumHandSide mainSide = getMainHand(entity);
if (getArmPoseForSide(mainSide) == ArmPose.EMPTY) return;
swingArm(getArmForSide(mainSide)); swingArm(getArmForSide(mainSide));
} }
} }

View file

@ -63,11 +63,10 @@ public class ModelAlicorn extends ModelPegasus implements IModelUnicorn {
@Override @Override
protected void swingItem(Entity entity, float swingProgress) { protected void swingItem(Entity entity, float swingProgress) {
if (canCast()) {
if (swingProgress > -9990.0F && !isSleeping) {
EnumHandSide mainSide = getMainHand(entity); EnumHandSide mainSide = getMainHand(entity);
if (getArmPoseForSide(mainSide) == ArmPose.EMPTY) return; if (canCast() && getArmPoseForSide(mainSide) != ArmPose.EMPTY) {
if (swingProgress > -9990.0F && !isSleeping) {
swingArm(getUnicornArmForSide(mainSide)); swingArm(getUnicornArmForSide(mainSide));
} }
} else { } else {