Skeletons now lower their bow when not attacking. ;)

This commit is contained in:
Sollace 2024-04-30 19:11:48 +01:00
parent a9051293b7
commit 8d385a3202
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -9,6 +9,7 @@ import net.minecraft.util.Arm;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import com.minelittlepony.api.model.MobPosingHelper; import com.minelittlepony.api.model.MobPosingHelper;
import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.client.model.entity.race.AlicornModel; import com.minelittlepony.client.model.entity.race.AlicornModel;
public class SkeleponyModel<T extends HostileEntity> extends AlicornModel<T> { public class SkeleponyModel<T extends HostileEntity> extends AlicornModel<T> {
@ -58,11 +59,11 @@ public class SkeleponyModel<T extends HostileEntity> extends AlicornModel<T> {
@Override @Override
protected void rotateLegs(float move, float swing, float ticks, T entity) { protected void rotateLegs(float move, float swing, float ticks, T entity) {
super.rotateLegs(move, swing, ticks, entity); super.rotateLegs(move, swing, ticks, entity);
if (rightArmPose != ArmPose.EMPTY) { if (rightArmPose != ArmPose.EMPTY && entity.isAttacking()) {
rotateArmHolding(getArm(Arm.RIGHT), -1, getSwingAmount(), ticks); rotateArmHolding(getArm(Arm.RIGHT), -1, getSwingAmount(), ticks);
} }
if (leftArmPose != ArmPose.EMPTY) { if (leftArmPose != ArmPose.EMPTY && entity.isAttacking()) {
rotateArmHolding(getArm(Arm.LEFT), -1, getSwingAmount(), ticks); rotateArmHolding(getArm(Arm.LEFT), -1, getSwingAmount(), ticks);
} }
} }
@ -72,8 +73,8 @@ public class SkeleponyModel<T extends HostileEntity> extends AlicornModel<T> {
} }
@Override @Override
public boolean hasMagic() { public Race getRace() {
return isUnicorn; return isUnicorn ? super.getRace() : Race.EARTH;
} }
@Override @Override