public void affect(Entity entity) {
   BendingHitEvent event = new BendingHitEvent(this, entity);
   Bending.callEvent(event);
   if (event.isCancelled()) {
     return;
   }
   DamageTools.damageEntity(bender, entity, this, DAMAGE);
   Enflamed.enflame(player, entity, 4, this);
 }
Example #2
0
  private void affect(Entity entity) {
    BendingHitEvent event = new BendingHitEvent(ability, entity);
    Bending.callEvent(event);
    if (event.isCancelled()) {
      return;
    }

    double damage = DAMAGE;
    if (bender.hasPath(BendingPath.TOUGH)) {
      damage *= 0.85;
    }

    if (bender.hasPath(BendingPath.RECKLESS)) {
      damage *= 1.15;
    }

    if (entity instanceof LivingEntity) {
      DamageTools.damageEntity(bender, entity, ability, damage);
    }

    Vector vector = direction.clone();
    vector.setY(.5);
    entity.setVelocity(vector);
  }