use of thehippomaster.AnimationAPI.IAnimatedEntity in project ArsMagica2 by Mithion.
the class AIShakeHead method shouldAnimate.
public boolean shouldAnimate() {
EntityLiving living = getEntity();
if (living.getAttackTarget() == null)
return false;
if (living.getHealth() > living.getMaxHealth() - 4)
return false;
IAnimatedEntity entity = (IAnimatedEntity) living;
return entity.getAnimID() == 0 && living.getRNG().nextInt(30) == 0;
}
Aggregations