Interface RangedEntity

All Superinterfaces:
Attributable, net.kyori.adventure.audience.Audience, CommandSender, Damageable, Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, net.kyori.adventure.pointer.Pointered, ProjectileSource, ServerOperator
All Known Subinterfaces:
Drowned, Illusioner, Llama, Piglin, Pillager, Skeleton, Snowman, TraderLlama, Witch, Wither

public interface RangedEntity extends Mob
  • Method Details

    • rangedAttack

      void rangedAttack(@NotNull @NotNull LivingEntity target, float charge)
      Attack the specified entity using a ranged attack.
      Parameters:
      target - the entity to target
      charge - How "charged" the attack is (how far back the bow was pulled for Bow attacks). This should be a value between 0 and 1, represented as targetDistance/maxDistance.
    • setChargingAttack

      void setChargingAttack(boolean raiseHands)
      Sets that the Entity is "charging" up an attack, by raising its hands
      Parameters:
      raiseHands - Whether the entities hands are raised to charge attack
    • isChargingAttack

      default boolean isChargingAttack()
      Alias to LivingEntity.isHandRaised(), if the entity is charging an attack
      Returns:
      If entities hands are raised