MineLittlePony/src/main/java/com/minelittlepony/model/pony/ModelZombiePony.java

45 lines
1.1 KiB
Java
Raw Normal View History

2016-11-17 05:45:04 +01:00
package com.minelittlepony.model.pony;
2015-08-02 00:36:33 +02:00
2016-05-04 03:23:57 +02:00
import net.minecraft.util.math.MathHelper;
2015-08-02 00:36:33 +02:00
import com.minelittlepony.model.entity.ModelMobPony;
public class ModelZombiePony extends ModelMobPony {
2015-08-02 00:36:33 +02:00
public ModelZombiePony() {
super();
}
private boolean isRight(float move) {
return MathHelper.sin(move / 20f) < 0f;
}
2015-08-02 00:36:33 +02:00
@Override
protected void rotateRightArm(float var8, float var9, float move, float tick) {
if (this.rightArmPose != ArmPose.EMPTY) return;
if (isRight(move)) {
rotateArmHolding(bipedRightArm, 1, var8, var9, tick);
2015-08-02 00:36:33 +02:00
} else {
rotateArmHolding(bipedLeftArm, -1, var8, var9, tick);
2015-08-02 00:36:33 +02:00
}
}
@Override
protected void rotateLeftArm(float var8, float var9, float move, float tick) {
2015-08-02 00:36:33 +02:00
}
@Override
protected void fixSpecialRotationPoints(float move) {
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
}
}
}