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
Field npcComponent.
isTracked
Field isTracked.
world
Field world.
worldSpawnData
Field worldSpawnData.
environmentIndex
Field environmentIndex.
chunkStore
Field chunkStore.
chunkComponentStore
Field chunkComponentStore.
position
Field position.
originX
Field originX.
originZ
Field originZ.
spiralIterator
Field spiralIterator.
chunkIndex
Field chunkIndex.
context
Field context.
worldEnvironmentSpawnData
Field worldEnvironmentSpawnData.
npcSpawnStat
Field npcSpawnStat.
transformComponent
Field transformComponent.
chunkSpawnData
Field chunkSpawnData.
spawnData
Field spawnData.
chunkSpawnedNPCDataComponent
Field chunkSpawnedNPCDataComponent.
spawnedNPCs
Field spawnedNPCs.
worldChunkComponent
Field worldChunkComponent.
expectedNPCs
Field expectedNPCs.
remainingSpace
Field remainingSpace.
env
Field env.
Method Detail
WorldSpawnTrackingSystem
public
WorldSpawnTrackingSystem
(@Nonnull final ResourceType worldSpawnDataResourceType, @Nonnull final ComponentType chunkSpawnDataComponentType, @Nonnull final ComponentType chunkSpawnedNPCDataComponentType)
Method WorldSpawnTrackingSystem.
- Parameters:
@Nonnull final ResourceTypeworldSpawnDataResourceType@Nonnull final ComponentTypechunkSpawnDataComponentType@Nonnull final ComponentTypechunkSpawnedNPCDataComponentType
onEntityAdded
void
onEntityAdded
(@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityAdded.
- Parameters:
@Nonnull final Refref@Nonnull final AddReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
chunk
on
chunk
(%s, %s)
Method chunk.
- Parameters:
%s%s
environments
matching
environments
(%s)
Method environments.
- Parameters:
%s%s
onEntityRemove
void
onEntityRemove
(@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityRemove.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
trackNPC
boolean
trackNPC
(final int environmentIndex, final int roleIndex, @Nonnull final WorldSpawnData worldSpawnData, @Nonnull final World world, @Nonnull final ComponentAccessor componentAccessor)
Method trackNPC.
- Parameters:
final intenvironmentIndexfinal introleIndex@Nonnull final WorldSpawnDataworldSpawnData@Nonnull final Worldworld@Nonnull final ComponentAccessorcomponentAccessor
untrackNPC
boolean
untrackNPC
(final int environmentIndex, final int roleIndex, @Nonnull final WorldSpawnData worldSpawnData)
Method untrackNPC.
- Parameters:
final intenvironmentIndexfinal introleIndex@Nonnull final WorldSpawnDataworldSpawnData
trackNewNPC
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 Refreffinal intenvironmentIndexdoublecount@Nonnull final ComponentTypechunkSpawnDataComponentType@Nonnull final ComponentTypechunkSpawnedNPCDataComponentType@Nonnull final Storestore
untrackRemovedNPC
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 Refreffinal intenvironmentIndexdoublecount@Nonnull final ComponentTypechunkSpawnDataComponentType@Nonnull final ComponentTypechunkSpawnedNPCDataComponentType@Nonnull final Storestore
getEnvironmentName
String
getEnvironmentName
(final int id)
Method getEnvironmentName.
- Parameters:
final intid