2018-04-25 16:40:47 +02:00
|
|
|
package com.minelittlepony.model.ponies;
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2018-04-25 16:40:47 +02:00
|
|
|
import com.minelittlepony.model.ModelMobPony;
|
|
|
|
import com.minelittlepony.model.armour.ModelZombiePonyArmor;
|
|
|
|
import com.minelittlepony.model.armour.PonyArmor;
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2018-04-25 16:40:47 +02:00
|
|
|
import net.minecraft.util.math.MathHelper;
|
2018-04-25 12:59:18 +02:00
|
|
|
|
|
|
|
public class ModelZombiePony extends ModelMobPony {
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2016-01-19 06:34:07 +01:00
|
|
|
public ModelZombiePony() {
|
2018-04-25 12:59:18 +02:00
|
|
|
super();
|
2016-01-19 06:34:07 +01:00
|
|
|
}
|
2018-04-25 12:59:18 +02:00
|
|
|
|
2018-04-25 16:40:47 +02:00
|
|
|
@Override
|
|
|
|
public PonyArmor createArmour() {
|
|
|
|
return new PonyArmor(new ModelZombiePonyArmor(), new ModelZombiePonyArmor());
|
|
|
|
}
|
|
|
|
|
2018-04-25 12:59:18 +02:00
|
|
|
private boolean isRight(float move) {
|
2018-04-25 16:40:47 +02:00
|
|
|
return MathHelper.sin(move / 20f) < 0;
|
2018-04-25 12:59:18 +02:00
|
|
|
}
|
|
|
|
|
2015-08-02 00:36:33 +02:00
|
|
|
@Override
|
2018-04-25 21:29:49 +02:00
|
|
|
protected void rotateRightArm(float move, float tick) {
|
2018-04-25 16:40:47 +02:00
|
|
|
if (rightArmPose != ArmPose.EMPTY) return;
|
2018-04-25 12:59:18 +02:00
|
|
|
|
|
|
|
if (isRight(move)) {
|
2018-04-25 21:29:49 +02:00
|
|
|
rotateArmHolding(bipedRightArm, 1, swingProgress, tick);
|
2015-08-02 00:36:33 +02:00
|
|
|
} else {
|
2018-04-25 21:29:49 +02:00
|
|
|
rotateArmHolding(bipedLeftArm, -1, swingProgress, tick);
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
2018-04-25 12:59:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-04-25 21:29:49 +02:00
|
|
|
protected void rotateLeftArm(float move, float tick) {
|
2018-04-25 12:59:18 +02:00
|
|
|
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void fixSpecialRotationPoints(float move) {
|
2018-04-25 12:59:18 +02:00
|
|
|
if (rightArmPose != ArmPose.EMPTY) return;
|
|
|
|
|
|
|
|
if (isRight(move)) {
|
|
|
|
shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3);
|
|
|
|
} else {
|
|
|
|
shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3);
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|