SpawnBeaconSystems

public class SpawnBeaconSystems

Class SpawnBeaconSystems. Provides spawnbeaconsystems functionality for the Hytale server.

java.lang.Object > SpawnBeaconSystems

Field Summary

legacySpawnBeaconComponent

final LegacySpawnBeaconEntity legacySpawnBeaconComponent

Field legacySpawnBeaconComponent.

spawnConfigId

final String spawnConfigId

Field spawnConfigId.

index

final int index

Field index.

world

final World world

Field world.

spawnController

final BeaconSpawnController spawnController

Field spawnController.

spawnWrapper

final BeaconSpawnWrapper spawnWrapper

Field spawnWrapper.

positionSelector

final FloodFillPositionSelector positionSelector

Field positionSelector.

maxSpawnScaleCurve

final ScaledXYResponseCurve maxSpawnScaleCurve

Field maxSpawnScaleCurve.

baseMaxTotalSpawns

final int baseMaxTotalSpawns

Field baseMaxTotalSpawns.

currentScaledMaxTotalSpawns

final int currentScaledMaxTotalSpawns

Field currentScaledMaxTotalSpawns.

delay

final InitialBeaconDelay delay

Field delay.

spawnBeaconComponent

final SpawnBeacon spawnBeaconComponent

Field spawnBeaconComponent.

config

final String config

Field config.

positionSelectorComponent

final FloodFillPositionSelector positionSelectorComponent

Field positionSelectorComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector3d position

Field position.

poolProvider

final FloodFillEntryPoolProviderSimple poolProvider

Field poolProvider.

uuidComponent

final UUIDComponent uuidComponent

Field uuidComponent.

despawnSelfAfter

final Instant despawnSelfAfter

Field despawnSelfAfter.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

ref

final Ref ref

Field ref.

npc

final NPCEntity npc

Field npc.

validatedEntityList

final List validatedEntityList

Field validatedEntityList.

spawnedEntities

final List> spawnedEntities

Field spawnedEntities.

entityTimeoutCounter

final Object2DoubleMap> entityTimeoutCounter

Field entityTimeoutCounter.

despawnNPCsIfIdle

final boolean despawnNPCsIfIdle

Field despawnNPCsIfIdle.

beaconRadiusSquared

final double beaconRadiusSquared

Field beaconRadiusSquared.

despawnNPCAfterTimeout

final double despawnNPCAfterTimeout

Field despawnNPCAfterTimeout.

spawnedEntityReference

final Ref spawnedEntityReference

Field spawnedEntityReference.

spawnedEntityNpcComponent

final NPCEntity spawnedEntityNpcComponent

Field spawnedEntityNpcComponent.

role

final Role role

Field role.

hasTarget

final boolean hasTarget

Field hasTarget.

spawnedEntityTransformComponent

final TransformComponent spawnedEntityTransformComponent

Field spawnedEntityTransformComponent.

npcPosition

final Vector3d npcPosition

Field npcPosition.

beaconDistance

final double beaconDistance

Field beaconDistance.

timeout

final double timeout

Field timeout.

timeManager

final WorldTimeResource timeManager

Field timeManager.

y

final int y

Field y.

yRange

final int[] yRange

Field yRange.

minY

final double minY

Field minY.

maxY

final double maxY

Field maxY.

results

final ObjectList> results

Field results.

playersInRegion

final List playersInRegion

Field playersInRegion.

result

final Ref result

Field result.

resultPlayerComponent

final PlayerRef resultPlayerComponent

Field resultPlayerComponent.

resultTransformComponent

final TransformComponent resultTransformComponent

Field resultTransformComponent.

yPos

final double yPos

Field yPos.

spawnBeaconRef

final Ref spawnBeaconRef

Field spawnBeaconRef.

playerReference

final Ref playerReference

Field playerReference.

playerTransformComponent

final TransformComponent playerTransformComponent

Field playerTransformComponent.

playerPos

final Vector3d playerPos

Field playerPos.

entitiesPerPlayer

final Object2IntMap entitiesPerPlayer

Field entitiesPerPlayer.

lockedTargetRef

final Ref lockedTargetRef

Field lockedTargetRef.

lockedTarget

final UUIDComponent lockedTarget

Field lockedTarget.

nextSpawnAfter

final Instant nextSpawnAfter

Field nextSpawnAfter.

now

final Instant now

Field now.

ownerRef

final Ref ownerRef

Field ownerRef.

concurrentSpawnScaleCurve

final ScaledXYResponseCurve concurrentSpawnScaleCurve

Field concurrentSpawnScaleCurve.

baseMaxConcurrentSpawns

final int[] baseMaxConcurrentSpawns

Field baseMaxConcurrentSpawns.

remainingSpawns

final int remainingSpawns

Field remainingSpawns.

legacySpawnBeaconEntity

final LegacySpawnBeaconEntity legacySpawnBeaconEntity

Field legacySpawnBeaconEntity.

playerPosition

final Vector3d playerPosition

Field playerPosition.

spawningContext

final SpawningContext spawningContext

Field spawningContext.

rotation

final Vector3f rotation

Field rotation.

roleIndex

final int roleIndex

Field roleIndex.

npcRef

final Ref npcRef

Field npcRef.

context

final HytaleLogger.Api context

Field context.

pos

final Vector3d pos

Field pos.

playerRef

final Ref playerRef

Field playerRef.

playerComponent

final Player playerComponent

Field playerComponent.

beaconDelayComponent

final InitialBeaconDelay beaconDelayComponent

Field beaconDelayComponent.

Method Detail

LegacyEntityAdded

public public LegacyEntityAdded (final ComponentType componentType)

Method LegacyEntityAdded.

Parameters:
final ComponentType componentType

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdded

public void onEntityAdded (@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityAdded.

Parameters:
@Nonnull final Ref ref
@Nonnull final AddReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onEntityRemove

public void onEntityRemove (@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityRemove.

Parameters:
@Nonnull final Ref ref
@Nonnull final RemoveReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

EntityAdded

public public EntityAdded (final ComponentType componentType)

Method EntityAdded.

Parameters:
final ComponentType componentType

PositionSelectorUpdate

public public PositionSelectorUpdate (final ComponentType componentType, final ResourceType floodFillEntryPoolProviderSimpleResourceType)

Method PositionSelectorUpdate.

Parameters:
final ComponentType componentType
final ResourceType floodFillEntryPoolProviderSimpleResourceType

SystemDependency

public new SystemDependency (Order.AFTER, CheckDespawn.class)

Method SystemDependency.

Parameters:
Order.AFTER Order.AFTER
CheckDespawn.class CheckDespawn.class

getDependencies

public Set> getDependencies ()

Method getDependencies.

isParallel

public boolean isParallel (final int archetypeChunkSize, final int taskCount)

Method isParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

tick

public void tick (final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
final int index
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

CheckDespawn

public public CheckDespawn (final ComponentType componentType, final ComponentType initialBeaconDelayComponentType)

Method CheckDespawn.

Parameters:
final ComponentType componentType
final ComponentType initialBeaconDelayComponentType

despawnAllSpawns

private void despawnAllSpawns (@Nonnull final List> spawnedEntities, @Nonnull final CommandBuffer commandBuffer)

Method despawnAllSpawns.

Parameters:
@Nonnull final List> spawnedEntities
@Nonnull final CommandBuffer commandBuffer

ControllerTick

public public ControllerTick (final ComponentType componentType, final ComponentType floodFillPositionSelectorComponentType, final ComponentType initialBeaconDelayComponentType)

Method ControllerTick.

Parameters:
final ComponentType componentType
final ComponentType floodFillPositionSelectorComponentType
final ComponentType initialBeaconDelayComponentType

isReadyToRespawn

static boolean isReadyToRespawn (final LegacySpawnBeaconEntity spawnBeacon, final WorldTimeResource timeManager)

Method isReadyToRespawn.

Parameters:
final LegacySpawnBeaconEntity spawnBeacon
final WorldTimeResource timeManager

prepareSpawnJobGeneration

protected void prepareSpawnJobGeneration (@Nonnull final BeaconSpawnController spawnController, @Nonnull final ComponentAccessor componentAccessor)

Method prepareSpawnJobGeneration.

Parameters:
@Nonnull final BeaconSpawnController spawnController
@Nonnull final ComponentAccessor componentAccessor

createRandomSpawnJobs

protected void createRandomSpawnJobs (@Nonnull final BeaconSpawnController spawnController, @Nonnull final ComponentAccessor componentAccessor)

Method createRandomSpawnJobs.

Parameters:
@Nonnull final BeaconSpawnController spawnController
@Nonnull final ComponentAccessor componentAccessor

SpawnJobTick

public public SpawnJobTick (final ComponentType componentType, final ComponentType initialBeaconDelayComponentType)

Method SpawnJobTick.

Parameters:
final ComponentType componentType
final ComponentType initialBeaconDelayComponentType

onStartRun

protected void onStartRun (final NPCBeaconSpawnJob spawnJob)

Method onStartRun.

Parameters:
final NPCBeaconSpawnJob spawnJob

onEndProbing

protected void onEndProbing (@Nonnull final BeaconSpawnController spawnController, @Nonnull final NPCBeaconSpawnJob spawnJob, final Result result, @Nonnull final ComponentAccessor componentAccessor)

Method onEndProbing.

Parameters:
@Nonnull final BeaconSpawnController spawnController
@Nonnull final NPCBeaconSpawnJob spawnJob
final Result result
@Nonnull final ComponentAccessor componentAccessor

if

public else if (result == Result.PERMANENT_FAILURE)

Method if.

Parameters:
result == Result.PERMANENT_FAILURE

pickSpawnPosition

protected boolean pickSpawnPosition (@Nonnull final BeaconSpawnController spawnController, @Nonnull final NPCBeaconSpawnJob spawnJob, @Nonnull final CommandBuffer commandBuffer)

Method pickSpawnPosition.

Parameters:
@Nonnull final BeaconSpawnController spawnController
@Nonnull final NPCBeaconSpawnJob spawnJob
@Nonnull final CommandBuffer commandBuffer

trySpawn

protected Result trySpawn (@Nonnull final BeaconSpawnController spawnController, @Nonnull final NPCBeaconSpawnJob spawnJob, @Nonnull final CommandBuffer commandBuffer)

Method trySpawn.

Parameters:
@Nonnull final BeaconSpawnController spawnController
@Nonnull final NPCBeaconSpawnJob spawnJob
@Nonnull final CommandBuffer commandBuffer

spawn

protected Result spawn (final World world, @Nonnull final BeaconSpawnController spawnController, @Nonnull final NPCBeaconSpawnJob spawnJob, @Nonnull final CommandBuffer commandBuffer)

Method spawn.

Parameters:
final World world
@Nonnull final BeaconSpawnController spawnController
@Nonnull final NPCBeaconSpawnJob spawnJob
@Nonnull final CommandBuffer commandBuffer

postSpawn

public > postSpawn (npc, ref, roleIndex, spawnController.isDebugSpawnFrozen()

Method postSpawn.

Parameters:
npc npc
ref ref
roleIndex roleIndex
spawnController.isDebugSpawnFrozen( spawnController.isDebugSpawnFrozen(

onSpawn

private void onSpawn (@Nonnull final Ref npcReference, @Nonnull final BeaconSpawnController spawnController, @Nonnull final NPCBeaconSpawnJob spawnJob, @Nonnull final Store store)

Method onSpawn.

Parameters:
@Nonnull final Ref npcReference
@Nonnull final BeaconSpawnController spawnController
@Nonnull final NPCBeaconSpawnJob spawnJob
@Nonnull final Store store

LoadTimeDelay

public public LoadTimeDelay (final ComponentType componentType)

Method LoadTimeDelay.

Parameters:
final ComponentType componentType