Class EndDragonFight

java.lang.Object
net.minecraft.world.level.dimension.end.EndDragonFight

public class EndDragonFight extends Object
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • MAX_TICKS_BEFORE_DRAGON_RESPAWN

      private static final int MAX_TICKS_BEFORE_DRAGON_RESPAWN
      See Also:
      Constant Field Values
    • TIME_BETWEEN_CRYSTAL_SCANS

      private static final int TIME_BETWEEN_CRYSTAL_SCANS
      See Also:
      Constant Field Values
    • TIME_BETWEEN_PLAYER_SCANS

      private static final int TIME_BETWEEN_PLAYER_SCANS
      See Also:
      Constant Field Values
    • ARENA_SIZE_CHUNKS

      private static final int ARENA_SIZE_CHUNKS
      See Also:
      Constant Field Values
    • ARENA_TICKET_LEVEL

      public static final int ARENA_TICKET_LEVEL
      See Also:
      Constant Field Values
    • GATEWAY_COUNT

      private static final int GATEWAY_COUNT
      See Also:
      Constant Field Values
    • GATEWAY_DISTANCE

      private static final int GATEWAY_DISTANCE
      See Also:
      Constant Field Values
    • DRAGON_SPAWN_Y

      public static final int DRAGON_SPAWN_Y
      See Also:
      Constant Field Values
    • VALID_PLAYER

      private static final Predicate<Entity> VALID_PLAYER
    • dragonEvent

      private final ServerBossEvent dragonEvent
    • level

      private final ServerLevel level
    • gateways

      private final List<Integer> gateways
    • exitPortalPattern

      private final BlockPattern exitPortalPattern
    • ticksSinceDragonSeen

      private int ticksSinceDragonSeen
    • crystalsAlive

      private int crystalsAlive
    • ticksSinceCrystalsScanned

      private int ticksSinceCrystalsScanned
    • ticksSinceLastPlayerScan

      private int ticksSinceLastPlayerScan
    • dragonKilled

      private boolean dragonKilled
    • previouslyKilled

      private boolean previouslyKilled
    • dragonUUID

      private UUID dragonUUID
    • needsStateScanning

      private boolean needsStateScanning
    • portalLocation

      private BlockPos portalLocation
    • respawnStage

      private DragonRespawnAnimation respawnStage
    • respawnTime

      private int respawnTime
    • respawnCrystals

      private List<EndCrystal> respawnCrystals
  • Constructor Details

  • Method Details

    • saveData

      public CompoundTag saveData()
    • tick

      public void tick()
    • scanState

      private void scanState()
    • findOrCreateDragon

      private void findOrCreateDragon()
    • setRespawnStage

      protected void setRespawnStage(DragonRespawnAnimation p_64088_)
    • hasActiveExitPortal

      private boolean hasActiveExitPortal()
    • findExitPortal

      @Nullable private BlockPattern.BlockPatternMatch findExitPortal()
    • isArenaLoaded

      private boolean isArenaLoaded()
    • updatePlayers

      private void updatePlayers()
    • updateCrystalCount

      private void updateCrystalCount()
    • setDragonKilled

      public void setDragonKilled(EnderDragon p_64086_)
    • spawnNewGateway

      private void spawnNewGateway()
    • spawnNewGateway

      private void spawnNewGateway(BlockPos p_64090_)
    • spawnExitPortal

      private void spawnExitPortal(boolean p_64094_)
    • createNewDragon

      private EnderDragon createNewDragon()
    • updateDragon

      public void updateDragon(EnderDragon p_64097_)
    • getCrystalsAlive

      public int getCrystalsAlive()
    • onCrystalDestroyed

      public void onCrystalDestroyed(EndCrystal p_64083_, DamageSource p_64084_)
    • hasPreviouslyKilledDragon

      public boolean hasPreviouslyKilledDragon()
    • tryRespawn

      public void tryRespawn()
    • respawnDragon

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

      public void resetSpikeCrystals()
    • addPlayer

      public void addPlayer(ServerPlayer player)
    • removePlayer

      public void removePlayer(ServerPlayer player)