BeaconSpawnController

public class BeaconSpawnController extends SpawnController

Class BeaconSpawnController. Provides beaconspawncontroller functionality for the Hytale server.

java.lang.Object > SpawnController > BeaconSpawnController

Field Summary

nextPlayerIndex

private int nextPlayerIndex

Field nextPlayerIndex.

baseMaxTotalSpawns

private int baseMaxTotalSpawns

Field baseMaxTotalSpawns.

currentScaledMaxTotalSpawns

private int currentScaledMaxTotalSpawns

Field currentScaledMaxTotalSpawns.

baseMaxConcurrentSpawns

private int[] baseMaxConcurrentSpawns

Field baseMaxConcurrentSpawns.

currentScaledMaxConcurrentSpawns

private int currentScaledMaxConcurrentSpawns

Field currentScaledMaxConcurrentSpawns.

spawnsThisRound

private int spawnsThisRound

Field spawnsThisRound.

remainingSpawns

private int remainingSpawns

Field remainingSpawns.

roundStart

private boolean roundStart

Field roundStart.

beaconRadiusSquared

private double beaconRadiusSquared

Field beaconRadiusSquared.

spawnRadiusSquared

private double spawnRadiusSquared

Field spawnRadiusSquared.

despawnNPCAfterTimeout

private double despawnNPCAfterTimeout

Field despawnNPCAfterTimeout.

despawnBeaconAfterTimeout

private Duration despawnBeaconAfterTimeout

Field despawnBeaconAfterTimeout.

despawnNPCsIfIdle

private boolean despawnNPCsIfIdle

Field despawnNPCsIfIdle.

legacySpawnBeaconComponent

final LegacySpawnBeaconEntity legacySpawnBeaconComponent

Field legacySpawnBeaconComponent.

wrapper

final BeaconSpawnWrapper wrapper

Field wrapper.

spawn

final RoleSpawnParameters spawn

Field spawn.

spawnId

final String spawnId

Field spawnId.

roleIndex

final int roleIndex

Field roleIndex.

predictedTotal

final int predictedTotal

Field predictedTotal.

beaconRadius

final double beaconRadius

Field beaconRadius.

spawnRadius

final double spawnRadius

Field spawnRadius.

context

final HytaleLogger.Api context

Field context.

ownerUuidComponent

final UUIDComponent ownerUuidComponent

Field ownerUuidComponent.

Method Detail

BeaconSpawnController

public public BeaconSpawnController (@Nonnull final World world, @Nonnull final Ref ownerRef)

Method BeaconSpawnController.

Parameters:
@Nonnull final World world
@Nonnull final Ref ownerRef

getMaxActiveJobs

public int getMaxActiveJobs ()

Method getMaxActiveJobs.

createRandomSpawnJob

public NPCBeaconSpawnJob createRandomSpawnJob (@Nonnull final ComponentAccessor componentAccessor)

Method createRandomSpawnJob.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

NPCBeaconSpawnJob

public new NPCBeaconSpawnJob ()

Method NPCBeaconSpawnJob.

initialise

public void initialise (@Nonnull final BeaconSpawnWrapper spawnWrapper)

Method initialise.

Parameters:
@Nonnull final BeaconSpawnWrapper spawnWrapper

getSpawnsThisRound

public int getSpawnsThisRound ()

Method getSpawnsThisRound.

setRemainingSpawns

public void setRemainingSpawns (final int remainingSpawns)

Method setRemainingSpawns.

Parameters:
final int remainingSpawns

addRoundSpawn

public void addRoundSpawn ()

Method addRoundSpawn.

isRoundStart

public boolean isRoundStart ()

Method isRoundStart.

setRoundStart

public void setRoundStart (final boolean roundStart)

Method setRoundStart.

Parameters:
final boolean roundStart

getOwnerRef

public Ref getOwnerRef ()

Method getOwnerRef.

getBaseMaxConcurrentSpawns

public int[] getBaseMaxConcurrentSpawns ()

Method getBaseMaxConcurrentSpawns.

getPlayersInRegion

public List getPlayersInRegion ()

Method getPlayersInRegion.

getCurrentScaledMaxConcurrentSpawns

public int getCurrentScaledMaxConcurrentSpawns ()

Method getCurrentScaledMaxConcurrentSpawns.

setCurrentScaledMaxConcurrentSpawns

public void setCurrentScaledMaxConcurrentSpawns (final int currentScaledMaxConcurrentSpawns)

Method setCurrentScaledMaxConcurrentSpawns.

Parameters:
final int currentScaledMaxConcurrentSpawns

getDespawnBeaconAfterTimeout

public Duration getDespawnBeaconAfterTimeout ()

Method getDespawnBeaconAfterTimeout.

getSpawnRadiusSquared

public double getSpawnRadiusSquared ()

Method getSpawnRadiusSquared.

getBeaconRadiusSquared

public double getBeaconRadiusSquared ()

Method getBeaconRadiusSquared.

getBaseMaxTotalSpawns

public int getBaseMaxTotalSpawns ()

Method getBaseMaxTotalSpawns.

setCurrentScaledMaxTotalSpawns

public void setCurrentScaledMaxTotalSpawns (final int currentScaledMaxTotalSpawns)

Method setCurrentScaledMaxTotalSpawns.

Parameters:
final int currentScaledMaxTotalSpawns

getSpawnedEntities

public List> getSpawnedEntities ()

Method getSpawnedEntities.

setNextPlayerIndex

public void setNextPlayerIndex (final int nextPlayerIndex)

Method setNextPlayerIndex.

Parameters:
final int nextPlayerIndex

getEntityTimeoutCounter

public Object2DoubleMap> getEntityTimeoutCounter ()

Method getEntityTimeoutCounter.

getEntitiesPerPlayer

public Object2IntMap getEntitiesPerPlayer ()

Method getEntitiesPerPlayer.

isDespawnNPCsIfIdle

public boolean isDespawnNPCsIfIdle ()

Method isDespawnNPCsIfIdle.

getDespawnNPCAfterTimeout

public double getDespawnNPCAfterTimeout ()

Method getDespawnNPCAfterTimeout.

getThreatComparator

public Comparator getThreatComparator ()

Method getThreatComparator.

notifySpawnedEntityExists

public void notifySpawnedEntityExists (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method notifySpawnedEntityExists.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

onJobFinished

public void onJobFinished (@Nonnull final ComponentAccessor componentAccessor)

Method onJobFinished.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

notifyNPCRemoval

public void notifyNPCRemoval (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method notifyNPCRemoval.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

hasSlots

public boolean hasSlots ()

Method hasSlots.

markNPCUnspawnable

public void markNPCUnspawnable (final int roleIndex)

Method markNPCUnspawnable.

Parameters:
final int roleIndex

clearUnspawnableNPCs

public void clearUnspawnableNPCs ()

Method clearUnspawnableNPCs.

onAllConcurrentSpawned

public void onAllConcurrentSpawned (@Nonnull final ComponentAccessor componentAccessor)

Method onAllConcurrentSpawned.

Parameters:
@Nonnull final ComponentAccessor componentAccessor