Interface DragonPhase

All Superinterfaces:
Keyed
All Known Implementing Classes:
CustomPhase

public interface DragonPhase extends Keyed
Represents a Dragon Phase
  • Method Details

    • getDragon

      Fetches the Dragon associated with this Custom Phase.
      Returns:
      EnderDragon used in this phase
    • getTargetLocation

      @NotNull @NotNull Location getTargetLocation()
      Fetches the target location of the Ender Dragon during this Phase.
      Returns:
      Target Location during Phase
    • start

      void start()
      Called when the Phase starts on the first tick.
    • stop

      void stop()
      Called when the Phase ends on the last tick.
    • clientTick

      void clientTick()
      Called every tick during the phase between the first and last.

      Use this method to handle client logic (e.g. packets, particles).
    • serverTick

      void serverTick()
      Called every tick during the phase between the first and last.

      Use this method to handle server logic (e.g. movements).
    • isSitting

      boolean isSitting()
      Whether the Ender Dragon is currently sitting.
      Returns:
      true if sitting, else false
    • getFlyingSpeed

      float getFlyingSpeed()
      Fetches the current flying speed of the dragon. Defaults to 0.6F.
      Returns:
      Flying Speed
    • onCrystalDestroyed

      default void onCrystalDestroyed(EnderCrystal c, EntityDamageEvent.DamageCause cause, @Nullable @Nullable Player p)
      Called when an End Crystal is destroyed during this phase.
      Parameters:
      c - Crystal Destroyed
      cause - Damage Cause that destroyed the Crystal
      p - Player that destroyed the crystal, can be null
    • onDamage

      default float onDamage(EntityDamageEvent.DamageCause cause, float amount)
      Called when the Dragon is damaged during this phase.
      Parameters:
      cause - Damage Cause that damaged the Dragon
      amount - Amount of damage that was dealt
      Returns:
      the new damage amount