Interface RangedEntity

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

@NullMarked public interface RangedEntity extends Mob
  • Method Details

    • rangedAttack

      void rangedAttack(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(since="1.19.2") 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(since="1.19.2") default boolean isChargingAttack()
      Alias to LivingEntity.isHandRaised(), if the entity is charging an attack
      Returns:
      If entities hands are raised