Class TriggerVolumeEntityQuery

java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.effect.TriggerVolumeEntityQuery

public final class TriggerVolumeEntityQuery extends Object
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 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) when roleFilters is 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 when includeNpcs is set (optionally restricted to roleFilter when non-blank) and players when includePlayers is 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 of collectTargets(Store, List, boolean, boolean, String) that restricts NPCs to any of the given roles (case-insensitive). An empty roleFilters matches every living NPC.