Contents
Class TriggerVolumeEntityQuery
java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.effect.TriggerVolumeEntityQuery
Shared spatial lookup for living entities inside trigger volumes. Queries the entity and/or player
spatial index directly against each volume's shape, so it finds entities regardless of the volume's
configured target types (which only drive ENTER/TICK tracking). Corpses (entities carrying
DeathComponent) are excluded.-
Method Summary
Modifier and TypeMethodDescriptionstatic List<Ref<EntityStore>> collectLivingNpcs(Store<EntityStore> store, List<VolumeEntry> volumes, Collection<String> roleFilters) Collects the distinct living NPCs currently inside the given volumes, optionally restricted to a set of roles (case-insensitive) whenroleFiltersis non-empty.static List<Ref<EntityStore>> collectTargets(Store<EntityStore> store, List<VolumeEntry> volumes, boolean includeNpcs, boolean includePlayers, String roleFilter) Collects the distinct living entities currently inside the given volumes.static List<Ref<EntityStore>> collectTargets(Store<EntityStore> store, List<VolumeEntry> volumes, boolean includeNpcs, boolean includePlayers, Collection<String> roleFilters) Variant ofcollectTargets(Store, List, boolean, boolean, String)that restricts NPCs to any of the given roles (case-insensitive).
-
Method Details
-
collectLivingNpcs
@Nonnull public static List<Ref<EntityStore>> collectLivingNpcs(@Nonnull Store<EntityStore> store, @Nonnull List<VolumeEntry> volumes, @Nonnull Collection<String> roleFilters) Collects the distinct living NPCs currently inside the given volumes, optionally restricted to a set of roles (case-insensitive) whenroleFiltersis non-empty. An NPC matches when its role equals any of the given filters. -
collectTargets
@Nonnull public static List<Ref<EntityStore>> collectTargets(@Nonnull Store<EntityStore> store, @Nonnull List<VolumeEntry> volumes, boolean includeNpcs, boolean includePlayers, @Nonnull String roleFilter) Collects the distinct living entities currently inside the given volumes. NPCs are gathered whenincludeNpcsis set (optionally restricted toroleFilterwhen non-blank) and players whenincludePlayersis set. The result is a fresh list so callers may safely run further spatial queries while iterating it. -
collectTargets
@Nonnull public static List<Ref<EntityStore>> collectTargets(@Nonnull Store<EntityStore> store, @Nonnull List<VolumeEntry> volumes, boolean includeNpcs, boolean includePlayers, @Nonnull Collection<String> roleFilters) Variant ofcollectTargets(Store, List, boolean, boolean, String)that restricts NPCs to any of the given roles (case-insensitive). An emptyroleFiltersmatches every living NPC.
-