Interface RangedEntity

All Superinterfaces:
Attributable, Audience, CommandSender, Damageable, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
AbstractSkeleton, Drowned, Illusioner, Llama, Piglin, Pillager, Skeleton, Snowman, Stray, TraderLlama, Witch, Wither, WitherSkeleton

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

      @Deprecated 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

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