Class WorldSpawnTrackingSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.RefSystem<EntityStore>
com.hypixel.hytale.server.spawning.world.system.WorldSpawnTrackingSystem
- All Implemented Interfaces:
ISystem<EntityStore>,QuerySystem<EntityStore>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentType<ChunkStore, ChunkSpawnData> private final ComponentType<ChunkStore, ChunkSpawnedNPCData> private static final intprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final ComponentType<EntityStore, NPCEntity> private final Query<EntityStore> private final ComponentType<EntityStore, TransformComponent> private final ResourceType<EntityStore, WorldSpawnData> Fields inherited from interface com.hypixel.hytale.component.system.ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionWorldSpawnTrackingSystem(ResourceType<EntityStore, WorldSpawnData> worldSpawnDataResourceType, ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType) -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringgetEnvironmentName(int id) getQuery()voidonEntityAdded(Ref<EntityStore> ref, AddReason reason, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) voidonEntityRemove(Ref<EntityStore> ref, RemoveReason reason, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) private static doubletrackNewNPC(Ref<ChunkStore> ref, int environmentIndex, double count, ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType, Store<ChunkStore> store) private static booleantrackNPC(int environmentIndex, int roleIndex, WorldSpawnData worldSpawnData, World world, ComponentAccessor<EntityStore> componentAccessor) private static booleanuntrackNPC(int environmentIndex, int roleIndex, WorldSpawnData worldSpawnData) private static doubleuntrackRemovedNPC(Ref<ChunkStore> ref, int environmentIndex, double count, ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType, Store<ChunkStore> store) Methods inherited from class com.hypixel.hytale.component.system.System
getComponentRegistrations, getResourceRegistrations, registerComponent, registerComponent, registerComponent, registerResource, registerResourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.system.ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface com.hypixel.hytale.component.system.QuerySystem
test
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
COUNT_SPREAD_RADIUS
private static final int COUNT_SPREAD_RADIUS- See Also:
-
npcComponentType
-
transformComponentType
-
worldSpawnDataResourceType
-
chunkSpawnDataComponentType
-
chunkSpawnedNPCDataComponentType
-
query
-
-
Constructor Details
-
WorldSpawnTrackingSystem
public WorldSpawnTrackingSystem(@Nonnull ResourceType<EntityStore, WorldSpawnData> worldSpawnDataResourceType, @Nonnull ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, @Nonnull ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType)
-
-
Method Details
-
getQuery
-
onEntityAdded
public void onEntityAdded(@Nonnull Ref<EntityStore> ref, @Nonnull AddReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) - Specified by:
onEntityAddedin classRefSystem<EntityStore>
-
onEntityRemove
public void onEntityRemove(@Nonnull Ref<EntityStore> ref, @Nonnull RemoveReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) - Specified by:
onEntityRemovein classRefSystem<EntityStore>
-
trackNPC
private static boolean trackNPC(int environmentIndex, int roleIndex, @Nonnull WorldSpawnData worldSpawnData, @Nonnull World world, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
untrackNPC
private static boolean untrackNPC(int environmentIndex, int roleIndex, @Nonnull WorldSpawnData worldSpawnData) -
trackNewNPC
private static double trackNewNPC(@Nonnull Ref<ChunkStore> ref, int environmentIndex, double count, @Nonnull ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, @Nonnull ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType, @Nonnull Store<ChunkStore> store) -
untrackRemovedNPC
private static double untrackRemovedNPC(@Nonnull Ref<ChunkStore> ref, int environmentIndex, double count, @Nonnull ComponentType<ChunkStore, ChunkSpawnData> chunkSpawnDataComponentType, @Nonnull ComponentType<ChunkStore, ChunkSpawnedNPCData> chunkSpawnedNPCDataComponentType, @Nonnull Store<ChunkStore> store) -
getEnvironmentName
-