public class EnderDragonFight extends Object
Modifier and Type | Field and Description |
---|---|
private ServerBossBar |
bossBar |
private int |
crystalCountTimer |
private List<EndCrystalEntity> |
crystals |
private boolean |
doLegacyCheck |
private boolean |
dragonKilled |
private int |
dragonSeenTimer |
private EnderDragonSpawnState |
dragonSpawnState |
private UUID |
dragonUuid |
private int |
endCrystalsAlive |
private BlockPattern |
endPortalPattern |
private BlockPos |
exitPortalLocation |
private List<Integer> |
gateways |
private static Logger |
LOGGER |
private int |
playerUpdateTimer |
private boolean |
previouslyKilled |
private int |
spawnStateTimer |
private static Predicate<Entity> |
VALID_ENTITY |
private ServerWorld |
world |
Constructor and Description |
---|
EnderDragonFight(ServerWorld world,
long long2,
CompoundTag compoundTag) |
Modifier and Type | Method and Description |
---|---|
private void |
checkDragonSeen() |
private void |
convertFromLegacy() |
private void |
countAliveCrystals() |
private EnderDragonEntity |
createDragon() |
void |
crystalDestroyed(EndCrystalEntity enderCrystal,
DamageSource source) |
void |
dragonKilled(EnderDragonEntity dragon) |
private BlockPattern.Result |
findEndPortal() |
private void |
generateEndGateway(BlockPos blockPos) |
private void |
generateEndPortal(boolean previouslyKilled) |
private void |
generateNewEndGateway() |
int |
getAliveEndCrystals() |
boolean |
hasPreviouslyKilled() |
private boolean |
loadChunks() |
void |
resetEndCrystals() |
void |
respawnDragon() |
private void |
respawnDragon(List<EndCrystalEntity> crystals) |
protected void |
setSpawnState(EnderDragonSpawnState enderDragonSpawnState) |
void |
tick() |
CompoundTag |
toTag() |
void |
updateFight(EnderDragonEntity dragon) |
private void |
updatePlayers() |
private boolean |
worldContainsEndPortal() |
private static final Logger LOGGER
private final ServerBossBar bossBar
private final ServerWorld world
private final BlockPattern endPortalPattern
private int dragonSeenTimer
private int endCrystalsAlive
private int crystalCountTimer
private int playerUpdateTimer
private boolean dragonKilled
private boolean previouslyKilled
private UUID dragonUuid
private boolean doLegacyCheck
private BlockPos exitPortalLocation
private EnderDragonSpawnState dragonSpawnState
private int spawnStateTimer
private List<EndCrystalEntity> crystals
public EnderDragonFight(ServerWorld world, long long2, CompoundTag compoundTag)
public CompoundTag toTag()
public void tick()
private void convertFromLegacy()
private void checkDragonSeen()
protected void setSpawnState(EnderDragonSpawnState enderDragonSpawnState)
private boolean worldContainsEndPortal()
@Nullable private BlockPattern.Result findEndPortal()
private boolean loadChunks()
private void updatePlayers()
private void countAliveCrystals()
public void dragonKilled(EnderDragonEntity dragon)
private void generateNewEndGateway()
private void generateEndGateway(BlockPos blockPos)
private void generateEndPortal(boolean previouslyKilled)
private EnderDragonEntity createDragon()
public void updateFight(EnderDragonEntity dragon)
public int getAliveEndCrystals()
public void crystalDestroyed(EndCrystalEntity enderCrystal, DamageSource source)
public boolean hasPreviouslyKilled()
public void respawnDragon()
private void respawnDragon(List<EndCrystalEntity> crystals)
public void resetEndCrystals()