Class TriggerVolumeWorldGenHandler

java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.RefSystem<EntityStore>
com.hypixel.hytale.builtin.triggervolumes.prefab.TriggerVolumeWorldGenHandler
All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>

public class TriggerVolumeWorldGenHandler extends RefSystem<EntityStore>
Converts trigger-volume transport entities placed by world generation into proper VolumeEntry registrations on the world's TriggerVolumeManager, then removes the transport entity so it does not persist as an inert holder.

The BuilderTools paste path performs the equivalent conversion via TriggerVolumePasteHandler on PrefabPlaceEntityEvent, but world-gen prefab placement (HytaleGenerator's PrefabProp) routes entities through GeneratedEntityChunk and never fires that event, so this handler picks them up when the chunk loads and the entities arrive in the EntityStore carrying a FromPrefabInstance marker.

Each converted volume gets a fresh random id. Worldgen entities only reach the store on actual generation (the NEWLY_GENERATED chunk flag is not set on plain disk loads), and TriggerVolumeChunkRegenSystem wipes the chunk's previous worldgen volumes before that conversion runs, so a regenerated prefab replaces its volumes rather than stacking duplicates without the ids needing to be stable across regens.

Volumes carrying a groupLinkId are grouped by (prefabInstanceId, linkId): linked volumes inside one prefab placement merge into one group, while different placements (same prefab type at a different anchor, or different prefab types entirely) get distinct groups. The mapping uses a deterministic group id so a prefab spanning multiple chunks resolves to the same group across chunk-load events without paste-style remap state.