Interface Projectile

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

public interface Projectile extends Entity
An entity flying through the air after being shot or thrown.

Like every entity, change it from the region thread owning its chunk.

Since:
0.1.0
  • Method Details

    • owner

      @Nullable Entity owner()
      Returns the entity that shot or threw this projectile, credited with what it hits, or null if there is none.
      Returns:
      the entity that shot or threw this projectile, credited with what it hits, or null if there is none
      Since:
      0.1.0
    • velocityX

      double velocityX()
      Returns the velocity of this projectile along the x axis, in blocks per tick.
      Returns:
      the velocity of this projectile along the x axis, in blocks per tick
      Since:
      0.1.0
    • velocityY

      double velocityY()
      Returns the velocity of this projectile along the y axis, in blocks per tick.
      Returns:
      the velocity of this projectile along the y axis, in blocks per tick
      Since:
      0.1.0
    • velocityZ

      double velocityZ()
      Returns the velocity of this projectile along the z axis, in blocks per tick.
      Returns:
      the velocity of this projectile along the z axis, in blocks per tick
      Since:
      0.1.0
    • setVelocity

      void setVelocity(double x, double y, double z)
      Changes the velocity of this projectile.
      Parameters:
      x - the velocity along the x axis, in blocks per tick
      y - the velocity along the y axis, in blocks per tick
      z - the velocity along the z axis, in blocks per tick
      Since:
      0.1.0