Class EnderDragonFight

java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.dimension.end.EnderDragonFight

public class EnderDragonFight extends SavedData
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAX_TICKS_BEFORE_DRAGON_RESPAWN

      private static final int MAX_TICKS_BEFORE_DRAGON_RESPAWN
      See Also:
    • TIME_BETWEEN_CRYSTAL_SCANS

      private static final int TIME_BETWEEN_CRYSTAL_SCANS
      See Also:
    • TIME_BETWEEN_PLAYER_SCANS

      public static final int TIME_BETWEEN_PLAYER_SCANS
      See Also:
    • ARENA_SIZE_CHUNKS

      private static final int ARENA_SIZE_CHUNKS
      See Also:
    • ARENA_TICKET_LEVEL

      public static final int ARENA_TICKET_LEVEL
      See Also:
    • GATEWAY_COUNT

      private static final int GATEWAY_COUNT
      See Also:
    • GATEWAY_DISTANCE

      private static final int GATEWAY_DISTANCE
      See Also:
    • DRAGON_SPAWN_Y

      public static final int DRAGON_SPAWN_Y
      See Also:
    • EVENT_DISPLAY_NAME

      private static final Component EVENT_DISPLAY_NAME
    • validPlayer

      private Predicate<Entity> validPlayer
    • dragonEvent

      private ServerBossEvent dragonEvent
    • level

      private ServerLevel level
    • origin

      private BlockPos origin
    • gateways

      private final List<Integer> gateways
    • exitPortalPattern

      private final BlockPattern exitPortalPattern
    • ticksSinceDragonSeen

      private int ticksSinceDragonSeen
    • aliveCrystals

      private int aliveCrystals
    • ticksSinceCrystalsScanned

      private int ticksSinceCrystalsScanned
    • ticksSinceLastPlayerScan

      private int ticksSinceLastPlayerScan
    • dragonKilled

      private boolean dragonKilled
    • hasPreviouslyKilledDragon

      private boolean hasPreviouslyKilledDragon
    • skipArenaLoadedCheck

      private boolean skipArenaLoadedCheck
    • dragonUUID

      private @Nullable UUID dragonUUID
    • needsStateScanning

      private boolean needsStateScanning
    • exitPortalLocation

      private @Nullable BlockPos exitPortalLocation
    • respawnStage

      private @Nullable DragonRespawnStage respawnStage
    • respawnTime

      private int respawnTime
    • respawnCrystals

      private List<EntityReference<EndCrystal>> respawnCrystals
    • CODEC

      public static final com.mojang.serialization.Codec<EnderDragonFight> CODEC
    • TYPE

      public static final SavedDataType<EnderDragonFight> TYPE
  • Constructor Details

  • Method Details

    • createDefault

      public static EnderDragonFight createDefault()
    • init

      public void init(ServerLevel level, long seed, BlockPos origin)
    • skipArenaLoadedCheck

      @Deprecated public void skipArenaLoadedCheck()
      Deprecated.
    • tick

      public void tick()
    • scanState

      private void scanState()
    • findOrCreateDragon

      private void findOrCreateDragon()
    • setRespawnStage

      protected void setRespawnStage(DragonRespawnStage stage)
    • hasActiveExitPortal

      private boolean hasActiveExitPortal()
    • findExitPortal

      private @Nullable BlockPattern.BlockPatternMatch findExitPortal()
    • isArenaLoaded

      private boolean isArenaLoaded()
    • updatePlayers

      private void updatePlayers()
    • updateCrystalCount

      private void updateCrystalCount()
    • setDragonKilled

      public void setDragonKilled(EnderDragon dragon)
    • removeAllGateways

      @Deprecated public void removeAllGateways()
      Deprecated.
    • spawnNewGateway

      private void spawnNewGateway()
    • spawnNewGateway

      private void spawnNewGateway(BlockPos pos)
    • spawnExitPortal

      private void spawnExitPortal(boolean activated)
    • createNewDragon

      private @Nullable EnderDragon createNewDragon()
    • updateDragon

      public void updateDragon(EnderDragon dragon)
    • aliveCrystals

      public int aliveCrystals()
    • onCrystalDestroyed

      public void onCrystalDestroyed(EndCrystal crystal, DamageSource source)
    • abortRespawnSequence

      private void abortRespawnSequence()
    • hasPreviouslyKilledDragon

      public boolean hasPreviouslyKilledDragon()
    • tryRespawn

      public void tryRespawn()
    • respawnDragon

      private void respawnDragon(List<EndCrystal> crystals)
    • resetSpikeCrystals

      public void resetSpikeCrystals()
    • addPlayer

      public void addPlayer(ServerPlayer player)
    • removePlayer

      public void removePlayer(ServerPlayer player)
    • dragonUUID

      public @Nullable UUID dragonUUID()