WorldSpawnJobSystems

public class WorldSpawnJobSystems

Class WorldSpawnJobSystems. Provides worldspawnjobsystems functionality for the Hytale server.

java.lang.Object > WorldSpawnJobSystems

Field Summary

roleIndex

final int roleIndex

Field roleIndex.

context

final HytaleLogger.Api context

Field context.

spawningContext

final SpawningContext spawningContext

Field spawningContext.

context2

final HytaleLogger.Api context2

Field context2.

suppressionSpanHelper

final SuppressionSpanHelper suppressionSpanHelper

Field suppressionSpanHelper.

chunkSuppressionMap

final Long2ObjectConcurrentHashMap chunkSuppressionMap

Field chunkSuppressionMap.

spawnBlockSet

final IntSet spawnBlockSet

Field spawnBlockSet.

spawnFluidTag

final int spawnFluidTag

Field spawnFluidTag.

iterator

final RandomChunkColumnIterator iterator

Field iterator.

result

final Result result

Field result.

role

final Builder role

Field role.

spawnTestResult

final SpawnTestResult spawnTestResult

Field spawnTestResult.

npcModule

final NPCPlugin npcModule

Field npcModule.

position

final Vector3d position

Field position.

rotation

final Vector3f rotation

Field rotation.

store

final Store store

Field store.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

npcRef

final Ref npcRef

Field npcRef.

success

final boolean success

Field success.

worldEnvironmentSpawnStats

final WorldEnvironmentSpawnData worldEnvironmentSpawnStats

Field worldEnvironmentSpawnStats.

spawnJobData

final SpawnJobData spawnJobData

Field spawnJobData.

worldChunk

final WorldChunk worldChunk

Field worldChunk.

worldSpawnData

final WorldSpawnData worldSpawnData

Field worldSpawnData.

world

final World world

Field world.

entityStore

final Store entityStore

Field entityStore.

chunkSpawnData

final ChunkSpawnData chunkSpawnData

Field chunkSpawnData.

chunkSpawnedNPCData

final ChunkSpawnedNPCData chunkSpawnedNPCData

Field chunkSpawnedNPCData.

environmentIndex

final int environmentIndex

Field environmentIndex.

spawnedNPCs

final double spawnedNPCs

Field spawnedNPCs.

chunkEnvironmentSpawnData

final ChunkEnvironmentSpawnData chunkEnvironmentSpawnData

Field chunkEnvironmentSpawnData.

spawnSuppressionController

final SpawnSuppressionController spawnSuppressionController

Field spawnSuppressionController.

Method Detail

run

static Result run (@Nonnull final SpawnJobData spawnJobData, @Nonnull final WorldChunk chunk, @Nonnull final ChunkEnvironmentSpawnData chunkEnvironmentSpawnData, @Nonnull final WorldSpawnData worldSpawnData, @Nonnull final SpawnSuppressionController spawnSuppressionController)

Method run.

Parameters:
@Nonnull final SpawnJobData spawnJobData
@Nonnull final WorldChunk chunk
@Nonnull final ChunkEnvironmentSpawnData chunkEnvironmentSpawnData
@Nonnull final WorldSpawnData worldSpawnData
@Nonnull final SpawnSuppressionController spawnSuppressionController

getSpawnable

static ISpawnableWithModel getSpawnable (final int roleIndex)

Method getSpawnable.

Parameters:
final int roleIndex

IllegalArgumentException

public new IllegalArgumentException ("Spawn job: Role must be a spawnable (non-abstract)

Method IllegalArgumentException.

Parameters:
"Spawn job: Role must be a spawnable (non-abstract

trySpawn

static Result trySpawn (@Nonnull final ISpawnableWithModel spawnable, final IntSet spawnBlockSet, final int spawnFluidTag, @Nonnull final SpawnJobData spawnJobData, @Nonnull final WorldChunk worldChunk, @Nonnull final ChunkEnvironmentSpawnData environmentSpawnData, @Nonnull final WorldSpawnData worldSpawnData)

Method trySpawn.

Parameters:
@Nonnull final ISpawnableWithModel spawnable
final IntSet spawnBlockSet
final int spawnFluidTag
@Nonnull final SpawnJobData spawnJobData
@Nonnull final WorldChunk worldChunk
@Nonnull final ChunkEnvironmentSpawnData environmentSpawnData
@Nonnull final WorldSpawnData worldSpawnData

if

public else if (!canSpawnOnBlock(spawnBlockSet, spawnFluidTag, spawningContext)

Method if.

Parameters:
!canSpawnOnBlock(spawnBlockSet !canSpawnOnBlock(spawnBlockSet
spawnFluidTag spawnFluidTag
spawningContext spawningContext

preAddToWorld

public > preAddToWorld (_npc, _holder, roleIndex, spawnJobData)

Method preAddToWorld.

Parameters:
_npc _npc
_holder _holder
roleIndex roleIndex
spawnJobData spawnJobData

canSpawnOnBlock

static boolean canSpawnOnBlock (@Nullable final IntSet spawnBlockSet, final int spawnFluidTag, @Nonnull final SpawningContext spawningContext)

Method canSpawnOnBlock.

Parameters:
@Nullable final IntSet spawnBlockSet
final int spawnFluidTag
@Nonnull final SpawningContext spawningContext

rejectSpan

static void rejectSpan (@Nonnull final Object2IntMap rejectionMap, final SpawnRejection rejection)

Method rejectSpan.

Parameters:
@Nonnull final Object2IntMap rejectionMap
final SpawnRejection rejection

updateSpawnStats

static void updateSpawnStats (@Nonnull final WorldSpawnData worldSpawnData, @Nonnull final SpawnJobData spawnJobData, final Result result)

Method updateSpawnStats.

Parameters:
@Nonnull final WorldSpawnData worldSpawnData
@Nonnull final SpawnJobData spawnJobData
final Result result

getSpawnableName

static String getSpawnableName (final int roleIndex)

Method getSpawnableName.

Parameters:
final int roleIndex

EntityRemoved

public public EntityRemoved (final ResourceType worldSpawnDataResourceType, final ComponentType spawnJobDataComponentType)

Method EntityRemoved.

Parameters:
final ResourceType worldSpawnDataResourceType
final ComponentType spawnJobDataComponentType

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdd

public void onEntityAdd (@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)

Method onEntityAdd.

Parameters:
@Nonnull final Holder holder
@Nonnull final AddReason reason
@Nonnull final Store store

onEntityRemoved

public void onEntityRemoved (@Nonnull final Holder entityHolder, @Nonnull final RemoveReason reason, @Nonnull final Store store)

Method onEntityRemoved.

Parameters:
@Nonnull final Holder entityHolder
@Nonnull final RemoveReason reason
@Nonnull final Store store

TickingState

public public TickingState (final ResourceType worldSpawnDataResourceType, final ComponentType spawnJobDataComponentType)

Method TickingState.

Parameters:
final ResourceType worldSpawnDataResourceType
final ComponentType spawnJobDataComponentType

componentType

public NonTicking> componentType ()

Method componentType.

onComponentAdded

public void onComponentAdded (@Nonnull final Ref ref, @Nonnull final NonTicking component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentAdded.

Parameters:
@Nonnull final Ref ref
@Nonnull final NonTicking component
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onComponentSet

public void onComponentSet (@Nonnull final Ref ref, final NonTicking oldComponent, @Nonnull final NonTicking newComponent, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentSet.

Parameters:
@Nonnull final Ref ref
final NonTicking oldComponent
@Nonnull final NonTicking newComponent
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onComponentRemoved

public void onComponentRemoved (@Nonnull final Ref ref, @Nonnull final NonTicking component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentRemoved.

Parameters:
@Nonnull final Ref ref
@Nonnull final NonTicking component
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

Ticking

public public Ticking (final ResourceType worldSpawnDataResourceType, final ResourceType spawnSuppressionControllerResourceType, final ComponentType spawnJobDataComponentType, final ComponentType chunkSpawnDataComponentType, final ComponentType chunkSpawnedNPCDataComponentType)

Method Ticking.

Parameters:
final ResourceType worldSpawnDataResourceType
final ResourceType spawnSuppressionControllerResourceType
final ComponentType spawnJobDataComponentType
final ComponentType chunkSpawnDataComponentType
final ComponentType chunkSpawnedNPCDataComponentType

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