mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-29 07:27:59 +01:00
Skeletons now lower their bow when not attacking. ;)
This commit is contained in:
parent
a9051293b7
commit
8d385a3202
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue