WorldSpawnTrackingSystem

public class WorldSpawnTrackingSystem extends RefSystem

System for handling worldspawntracking mechanics. Systems contain game logic that operates on entities with specific component types.

java.lang.Object > RefSystem > WorldSpawnTrackingSystem

Field Summary

npcComponent

final NPCEntity npcComponent

Field npcComponent.

isTracked

final boolean isTracked

Field isTracked.

world

final World world

Field world.

worldSpawnData

final WorldSpawnData worldSpawnData

Field worldSpawnData.

environmentIndex

final int environmentIndex

Field environmentIndex.

chunkStore

final ChunkStore chunkStore

Field chunkStore.

chunkComponentStore

final Store chunkComponentStore

Field chunkComponentStore.

position

final Vector3d position

Field position.

originX

final int originX

Field originX.

originZ

final int originZ

Field originZ.

spiralIterator

final SpiralIterator spiralIterator

Field spiralIterator.

chunkIndex

final long chunkIndex

Field chunkIndex.

context

final HytaleLogger.Api context

Field context.

chunkOptions

final Set> chunkOptions

Field chunkOptions.

worldEnvironmentSpawnData

final WorldEnvironmentSpawnData worldEnvironmentSpawnData

Field worldEnvironmentSpawnData.

npcSpawnStat

final WorldNPCSpawnStat npcSpawnStat

Field npcSpawnStat.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

chunkSpawnData

final ChunkSpawnData chunkSpawnData

Field chunkSpawnData.

spawnData

final ChunkEnvironmentSpawnData spawnData

Field spawnData.

chunkSpawnedNPCDataComponent

final ChunkSpawnedNPCData chunkSpawnedNPCDataComponent

Field chunkSpawnedNPCDataComponent.

spawnedNPCs

final double spawnedNPCs

Field spawnedNPCs.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

expectedNPCs

final double expectedNPCs

Field expectedNPCs.

remainingSpace

final double remainingSpace

Field remainingSpace.

env

final Environment env

Field env.

Method Detail

WorldSpawnTrackingSystem

public public WorldSpawnTrackingSystem (@Nonnull final ResourceType worldSpawnDataResourceType, @Nonnull final ComponentType chunkSpawnDataComponentType, @Nonnull final ComponentType chunkSpawnedNPCDataComponentType)

Method WorldSpawnTrackingSystem.

Parameters:
@Nonnull final ResourceType worldSpawnDataResourceType
@Nonnull final ComponentType chunkSpawnDataComponentType
@Nonnull final ComponentType chunkSpawnedNPCDataComponentType

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

chunk

public on chunk (%s, %s)

Method chunk.

Parameters:
%s %s

environments

public matching environments (%s)

Method environments.

Parameters:
%s %s

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

trackNPC

static boolean trackNPC (final int environmentIndex, final int roleIndex, @Nonnull final WorldSpawnData worldSpawnData, @Nonnull final World world, @Nonnull final ComponentAccessor componentAccessor)

Method trackNPC.

Parameters:
final int environmentIndex
final int roleIndex
@Nonnull final WorldSpawnData worldSpawnData
@Nonnull final World world
@Nonnull final ComponentAccessor componentAccessor

untrackNPC

static boolean untrackNPC (final int environmentIndex, final int roleIndex, @Nonnull final WorldSpawnData worldSpawnData)

Method untrackNPC.

Parameters:
final int environmentIndex
final int roleIndex
@Nonnull final WorldSpawnData worldSpawnData

trackNewNPC

static double trackNewNPC (@Nonnull final Ref ref, final int environmentIndex, double count, @Nonnull final ComponentType chunkSpawnDataComponentType, @Nonnull final ComponentType chunkSpawnedNPCDataComponentType, @Nonnull final Store store)

Method trackNewNPC.

Parameters:
@Nonnull final Ref ref
final int environmentIndex
double count
@Nonnull final ComponentType chunkSpawnDataComponentType
@Nonnull final ComponentType chunkSpawnedNPCDataComponentType
@Nonnull final Store store

untrackRemovedNPC

static double untrackRemovedNPC (@Nonnull final Ref ref, final int environmentIndex, double count, @Nonnull final ComponentType chunkSpawnDataComponentType, @Nonnull final ComponentType chunkSpawnedNPCDataComponentType, @Nonnull final Store store)

Method untrackRemovedNPC.

Parameters:
@Nonnull final Ref ref
final int environmentIndex
double count
@Nonnull final ComponentType chunkSpawnDataComponentType
@Nonnull final ComponentType chunkSpawnedNPCDataComponentType
@Nonnull final Store store

getEnvironmentName

static String getEnvironmentName (final int id)

Method getEnvironmentName.

Parameters:
final int id