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); }
private void affect(Entity entity) { BendingHitEvent event = new BendingHitEvent(this, entity); Bending.callEvent(event); if (event.isCancelled()) { return; } if (entity == player) { return; } Vector direction = origin.clone().subtract(entity.getLocation()).toVector(); double distance = direction.length(); entity.setVelocity( entity.getVelocity().add(direction.normalize().multiply(PUSH * distance / RADIUS))); entity.setFallDistance(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); }