Interface ArrowProjectile

All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, Projectile, SchedulerSource, Sound.Emitter, Sound.Source.Provider
All Known Subinterfaces:
Arrow, SpectralArrow, Trident

public interface ArrowProjectile extends Projectile
A projectile that flies like an arrow: it deals damage scaling with its speed, sticks in the block it hits and can be picked up again.
Since:
0.1.0
  • Method Details

    • baseDamage

      double baseDamage()
      Returns the damage of a hit at a speed of one block per tick, in half-hearts.
      Returns:
      the damage of a hit at a speed of one block per tick, in half-hearts
      Since:
      0.1.0
    • setBaseDamage

      void setBaseDamage(double damage)
      Changes the damage of a hit at a speed of one block per tick.
      Parameters:
      damage - the damage, in half-hearts
      Since:
      0.1.0
    • isCritical

      boolean isCritical()
      Returns true if this projectile was shot at full power, which adds a random bonus to its damage.
      Returns:
      true if this projectile was shot at full power, which adds a random bonus to its damage
      Since:
      0.1.0
    • setCritical

      void setCritical(boolean critical)
      Marks this projectile as shot at full power, or not.
      Parameters:
      critical - true for a critical projectile
      Since:
      0.1.0
    • piercing

      int piercing()
      Returns how many entities this projectile goes through before it stops.
      Returns:
      how many entities this projectile goes through before it stops
      Since:
      0.1.0
    • isStuck

      boolean isStuck()
      Returns true once this projectile is stuck in a block.
      Returns:
      true once this projectile is stuck in a block
      Since:
      0.1.0
    • canBePickedUp

      boolean canBePickedUp()
      Returns true if a player in survival mode may pick this projectile up.
      Returns:
      true if a player in survival mode may pick this projectile up
      Since:
      0.1.0
    • pickupItem

      ItemStack pickupItem()
      Returns the item a player gets back when picking this projectile up.
      Returns:
      the item a player gets back when picking this projectile up
      Since:
      0.1.0
    • weapon

      ItemStack weapon()
      Returns the bow, crossbow or trident this projectile was shot with, whose enchantments apply to its hits; ItemStack.EMPTY if unknown.
      Returns:
      the bow, crossbow or trident this projectile was shot with, whose enchantments apply to its hits; ItemStack.EMPTY if unknown
      Since:
      0.1.0