Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getMaxActiveJobs()
- createRandomSpawnJob(ComponentAccessor)
- initialise(BeaconSpawnWrapper)
- getSpawnsThisRound()
- setRemainingSpawns(int)
- addRoundSpawn()
- isRoundStart()
- setRoundStart(boolean)
- getOwnerRef()
- getBaseMaxConcurrentSpawns()
- getPlayersInRegion()
- getCurrentScaledMaxConcurrentSpawns()
- setCurrentScaledMaxConcurrentSpawns(int)
- getDespawnBeaconAfterTimeout()
- getSpawnRadiusSquared()
- getBeaconRadiusSquared()
- getBaseMaxTotalSpawns()
- setCurrentScaledMaxTotalSpawns(int)
- getSpawnedEntities()
- setNextPlayerIndex(int)
- getEntityTimeoutCounter()
- getEntitiesPerPlayer()
- isDespawnNPCsIfIdle()
- getDespawnNPCAfterTimeout()
- getThreatComparator()
- notifySpawnedEntityExists(Ref, ComponentAccessor)
- onJobFinished(ComponentAccessor)
- notifyNPCRemoval(Ref, ComponentAccessor)
- hasSlots()
- markNPCUnspawnable(int)
- clearUnspawnableNPCs()
- onAllConcurrentSpawned(ComponentAccessor)
Class BeaconSpawnController
java.lang.Object
com.hypixel.hytale.server.spawning.controllers.SpawnController<NPCBeaconSpawnJob>
com.hypixel.hytale.server.spawning.controllers.BeaconSpawnController
A spawn controller for NPC spawn beacons.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum number of spawn attempts per tick.static final doubleThe rounding break point for spawn calculations. -
Constructor Summary
ConstructorsConstructorDescriptionBeaconSpawnController(World world, Ref<EntityStore> ownerRef) Default Constructor for aBeaconSpawnControllerinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateRandomSpawnJob(ComponentAccessor<EntityStore> componentAccessor) int[]intdoubleintdoubleit.unimi.dsi.fastutil.objects.Object2IntMap<UUID> it.unimi.dsi.fastutil.objects.Reference2DoubleMap<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 SpawnController
addIdleJob, getActiveJobCount, getActiveJobs, getActualNPCs, getExpectedNPCs, getSpawnJob, getWorld, isDebugSpawnFrozen, isUnspawnable
-
Field Details
-
MAX_ATTEMPTS_PER_TICK
public static final int MAX_ATTEMPTS_PER_TICKThe maximum number of spawn attempts per tick.- See Also:
-
ROUNDING_BREAK_POINT
public static final double ROUNDING_BREAK_POINTThe rounding break point for spawn calculations.- See Also:
-
-
Constructor Details
-
BeaconSpawnController
Default Constructor for aBeaconSpawnControllerinstance.- Parameters:
world- The world this spawn controller belongs to.ownerRef- The entity reference of the owning spawn beacon entity.
-
-
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
public it.unimi.dsi.fastutil.objects.Reference2DoubleMap<Ref<EntityStore>> 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
-