Interface Fireball

All Superinterfaces:
Audience, CommandSender, Entity, Explosive, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, Pointered, Projectile, ServerOperator, Sound.Emitter
All Known Subinterfaces:
AbstractWindCharge, BreezeWindCharge, DragonFireball, LargeFireball, SizedFireball, SmallFireball, WindCharge, WitherSkull

public interface Fireball extends Projectile, Explosive
Represents a Fireball.
  • Method Details

    • setDirection

      void setDirection(@NotNull @NotNull Vector direction)
      Sets the direction the fireball should be flying towards. The direction vector will be normalized and the default speed will be applied.
      To also change the speed of the fireball, use setVelocity(Vector). Note: that the client may not respect non-default speeds and will therefore mispredict the location of the fireball, causing visual stutter.
      Also Note: that this method and setVelocity(Vector) will override each other.
      Parameters:
      direction - the direction this fireball should be flying towards
      See Also:
    • getDirection

      @NotNull @NotNull Vector getDirection()
      Retrieve the direction this fireball is heading toward The returned vector is not normalized.
      Returns:
      the direction
    • setVelocity

      void setVelocity(@NotNull @NotNull Vector velocity)
      Sets this entity's velocity in meters per tick

      Note: For fireball entities, their movement is also controlled by their power.

      Specified by:
      setVelocity in interface Entity
      Parameters:
      velocity - New velocity to travel with
      See Also:
    • setPower

      void setPower(@NotNull @NotNull Vector power)
      Sets the power of a fireball. The power determines the direction and magnitude of its acceleration.
      Parameters:
      power - the power
    • getPower

      Gets the power of a fireball. The power determines the direction and magnitude of its acceleration.
      Returns:
      the power