Class BeaconSpawnController
java.lang.Object
com.hypixel.hytale.server.spawning.controllers.SpawnController<NPCBeaconSpawnJob>
com.hypixel.hytale.server.spawning.controllers.BeaconSpawnController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private intprivate doubleprivate intprivate intprivate Durationprivate doubleprivate booleanprivate final it.unimi.dsi.fastutil.objects.Object2IntMap<UUID> private final it.unimi.dsi.fastutil.objects.Object2DoubleMap<Ref<EntityStore>> private static final com.hypixel.hytale.logger.HytaleLoggerstatic final intprivate intprivate final Ref<EntityStore> private intstatic final doubleprivate booleanprivate final List<Ref<EntityStore>> private doubleprivate intprivate final Comparator<PlayerRef> private final it.unimi.dsi.fastutil.ints.IntSetFields inherited from class com.hypixel.hytale.server.spawning.controllers.SpawnController
activeJobs, actualNPCs, baseMaxActiveJobs, debugSpawnFrozen, expectedNPCs, idleJobs, unspawnable, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateRandomSpawnJob(ComponentAccessor<EntityStore> componentAccessor) int[]intdoubleintdoubleit.unimi.dsi.fastutil.objects.Object2IntMap<UUID> it.unimi.dsi.fastutil.objects.Object2DoubleMap<Ref<EntityStore>> intdoubleintbooleanhasSlots()voidinitialise(BeaconSpawnWrapper spawnWrapper) booleanbooleanvoidmarkNPCUnspawnable(int roleIndex) voidnotifyNPCRemoval(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidnotifySpawnedEntityExists(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidonAllConcurrentSpawned(ComponentAccessor<EntityStore> componentAccessor) voidonJobFinished(ComponentAccessor<EntityStore> componentAccessor) voidsetCurrentScaledMaxConcurrentSpawns(int currentScaledMaxConcurrentSpawns) voidsetCurrentScaledMaxTotalSpawns(int currentScaledMaxTotalSpawns) voidsetNextPlayerIndex(int nextPlayerIndex) voidsetRemainingSpawns(int remainingSpawns) voidsetRoundStart(boolean roundStart) Methods inherited from class com.hypixel.hytale.server.spawning.controllers.SpawnController
addIdleJob, getActiveJobCount, getActiveJobs, getActualNPCs, getExpectedNPCs, getSpawnJob, getWorld, isDebugSpawnFrozen, isUnspawnable
-
Field Details
-
LOGGER
@Nonnull private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
MAX_ATTEMPTS_PER_TICK
public static final int MAX_ATTEMPTS_PER_TICK- See Also:
-
ROUNDING_BREAK_POINT
public static final double ROUNDING_BREAK_POINT- See Also:
-
ownerRef
-
spawnedEntities
-
playersInRegion
-
nextPlayerIndex
private int nextPlayerIndex -
entitiesPerPlayer
-
entityTimeoutCounter
-
unspawnableRoles
private final it.unimi.dsi.fastutil.ints.IntSet unspawnableRoles -
threatComparator
-
baseMaxTotalSpawns
private int baseMaxTotalSpawns -
currentScaledMaxTotalSpawns
private int currentScaledMaxTotalSpawns -
baseMaxConcurrentSpawns
private int[] baseMaxConcurrentSpawns -
currentScaledMaxConcurrentSpawns
private int currentScaledMaxConcurrentSpawns -
spawnsThisRound
private int spawnsThisRound -
remainingSpawns
private int remainingSpawns -
roundStart
private boolean roundStart -
beaconRadiusSquared
private double beaconRadiusSquared -
spawnRadiusSquared
private double spawnRadiusSquared -
despawnNPCAfterTimeout
private double despawnNPCAfterTimeout -
despawnBeaconAfterTimeout
-
despawnNPCsIfIdle
private boolean despawnNPCsIfIdle
-
-
Constructor Details
-
BeaconSpawnController
-
-
Method Details
-
getMaxActiveJobs
public int getMaxActiveJobs()- Overrides:
getMaxActiveJobsin classSpawnController<NPCBeaconSpawnJob>
-
createRandomSpawnJob
@Nullable public NPCBeaconSpawnJob createRandomSpawnJob(@Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
createRandomSpawnJobin classSpawnController<NPCBeaconSpawnJob>
-
initialise
-
getSpawnsThisRound
public int getSpawnsThisRound() -
setRemainingSpawns
public void setRemainingSpawns(int remainingSpawns) -
addRoundSpawn
public void addRoundSpawn() -
isRoundStart
public boolean isRoundStart() -
setRoundStart
public void setRoundStart(boolean roundStart) -
getOwnerRef
-
getBaseMaxConcurrentSpawns
public int[] getBaseMaxConcurrentSpawns() -
getPlayersInRegion
-
getCurrentScaledMaxConcurrentSpawns
public int getCurrentScaledMaxConcurrentSpawns() -
setCurrentScaledMaxConcurrentSpawns
public void setCurrentScaledMaxConcurrentSpawns(int currentScaledMaxConcurrentSpawns) -
getDespawnBeaconAfterTimeout
-
getSpawnRadiusSquared
public double getSpawnRadiusSquared() -
getBeaconRadiusSquared
public double getBeaconRadiusSquared() -
getBaseMaxTotalSpawns
public int getBaseMaxTotalSpawns() -
setCurrentScaledMaxTotalSpawns
public void setCurrentScaledMaxTotalSpawns(int currentScaledMaxTotalSpawns) -
getSpawnedEntities
-
setNextPlayerIndex
public void setNextPlayerIndex(int nextPlayerIndex) -
getEntityTimeoutCounter
-
getEntitiesPerPlayer
-
isDespawnNPCsIfIdle
public boolean isDespawnNPCsIfIdle() -
getDespawnNPCAfterTimeout
public double getDespawnNPCAfterTimeout() -
getThreatComparator
-
notifySpawnedEntityExists
public void notifySpawnedEntityExists(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onJobFinished
-
notifyNPCRemoval
public void notifyNPCRemoval(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
hasSlots
public boolean hasSlots() -
markNPCUnspawnable
public void markNPCUnspawnable(int roleIndex) -
clearUnspawnableNPCs
public void clearUnspawnableNPCs() -
onAllConcurrentSpawned
-