public class DragonFightManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
aliveCrystals |
private ServerBossInfo |
bossInfo |
private java.util.List<EnderCrystalEntity> |
crystals |
private boolean |
dragonKilled |
private java.util.UUID |
dragonUniqueId |
private BlockPos |
exitPortalLocation |
private java.util.List<java.lang.Integer> |
gateways |
private static org.apache.logging.log4j.Logger |
LOGGER |
private BlockPattern |
portalPattern |
private boolean |
previouslyKilled |
private DragonSpawnState |
respawnState |
private int |
respawnStateTicks |
private boolean |
scanForLegacyFight |
private int |
ticksSinceCrystalsScanned |
private int |
ticksSinceDragonSeen |
private int |
ticksSinceLastPlayerScan |
private static java.util.function.Predicate<Entity> |
VALID_PLAYER |
private ServerWorld |
world |
Constructor and Description |
---|
DragonFightManager(ServerWorld worldIn,
CompoundNBT compound,
EndDimension dim) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.function.Predicate<Entity> VALID_PLAYER
private final ServerBossInfo bossInfo
private final ServerWorld world
private final java.util.List<java.lang.Integer> gateways
private final BlockPattern portalPattern
private int ticksSinceDragonSeen
private int aliveCrystals
private int ticksSinceCrystalsScanned
private int ticksSinceLastPlayerScan
private boolean dragonKilled
private boolean previouslyKilled
private java.util.UUID dragonUniqueId
private boolean scanForLegacyFight
private BlockPos exitPortalLocation
private DragonSpawnState respawnState
private int respawnStateTicks
private java.util.List<EnderCrystalEntity> crystals
public DragonFightManager(ServerWorld worldIn, CompoundNBT compound, EndDimension dim)
public CompoundNBT write()
public void tick()
private void scanForLegacyFight()
private void findOrCreateDragon()
protected void setRespawnState(DragonSpawnState state)
private boolean exitPortalExists()
@Nullable private BlockPattern.PatternHelper findExitPortal()
private boolean isFightAreaLoaded()
private void updatePlayers()
private void findAliveCrystals()
public void processDragonDeath(EnderDragonEntity dragon)
private void spawnNewGateway()
private void generateGateway(BlockPos pos)
private void generatePortal(boolean active)
private EnderDragonEntity createNewDragon()
public void dragonUpdate(EnderDragonEntity dragonIn)
public int getNumAliveCrystals()
public void onCrystalDestroyed(EnderCrystalEntity crystal, DamageSource dmgSrc)
public boolean hasPreviouslyKilledDragon()
public void tryRespawnDragon()
private void respawnDragon(java.util.List<EnderCrystalEntity> crystalsIn)
public void resetSpikeCrystals()
public void addPlayer(ServerPlayerEntity player)
public void removePlayer(ServerPlayerEntity player)