Contents
Class TriggerVolumeChunkRegenSystem
java.lang.Object
com.hypixel.hytale.component.system.System<ChunkStore>
com.hypixel.hytale.component.system.RefSystem<ChunkStore>
com.hypixel.hytale.builtin.triggervolumes.prefab.TriggerVolumeChunkRegenSystem
- All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>
Drops worldgen-tagged trigger volumes whose anchor chunk has just been freshly generated, so that
viewport refreshes /
/chunk regenerate / /worldgen reload replace the manager's
entries instead of layering a new generation on top of the previous one. This matters when a
regenerated prefab now has fewer or relocated volumes: the deterministic ids used by
TriggerVolumeWorldGenHandler overwrite same-position entries in place, but stale entries at
positions the new generation no longer touches would otherwise linger.
Hooks onEntityAdded(Ref, AddReason, Store, CommandBuffer) on WorldChunk (in the chunk store) and only acts when the
chunk carries ChunkFlag.NEWLY_GENERATED - that flag is set in
ChunkGrid.preLoadChunkAsync only for holders produced by worldgen, so disk loads are
correctly skipped. Pruning happens before the new generation's transport entities reach the
EntityStore, so the TriggerVolumeWorldGenHandler re-registers the fresh set right after.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionTriggerVolumeChunkRegenSystem(ResourceType<EntityStore, TriggerVolumeManager> managerResourceType) -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()voidonEntityAdded(Ref<ChunkStore> ref, AddReason reason, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) Called after an entity has been added to aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.voidonEntityRemove(Ref<ChunkStore> ref, RemoveReason reason, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) Called before an entity has been removed from aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.Methods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope, test
-
Constructor Details
-
TriggerVolumeChunkRegenSystem
public TriggerVolumeChunkRegenSystem(@Nonnull ResourceType<EntityStore, TriggerVolumeManager> managerResourceType)
-
-
Method Details
-
onEntityAdded
public void onEntityAdded(@Nonnull Ref<ChunkStore> ref, @Nonnull AddReason reason, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) Description copied from class:RefSystemCalled after an entity has been added to aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.- Specified by:
onEntityAddedin classRefSystem<ChunkStore>- Parameters:
ref- The entity reference of the added entity.reason- The reason for the entity being added.store- The store the entity was added to.commandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity add.
-
onEntityRemove
public void onEntityRemove(@Nonnull Ref<ChunkStore> ref, @Nonnull RemoveReason reason, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) Description copied from class:RefSystemCalled before an entity has been removed from aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.- Specified by:
onEntityRemovein classRefSystem<ChunkStore>- Parameters:
ref- The entity reference of the removed entity.reason- The reason for the entity being removed.store- The store the entity is being removed from.commandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity remove.
-
getQuery
-