Enum Class HierarchyScope

java.lang.Object
java.lang.Enum<HierarchyScope>
com.hypixel.hytale.component.system.HierarchyScope
All Implemented Interfaces:
Serializable, Comparable<HierarchyScope>, Constable

public enum HierarchyScope extends Enum<HierarchyScope>
Which entities a QuerySystem processes, by their place in the store hierarchy.

The scope is applied per table, so it is exact for ticking and ArchetypeChunkSystem callbacks. A HolderSystem or RefSystem only hears about an entity when it is added to or removed from the store, so a later reparent or first child does not notify it.

  • Enum Constant Details

    • ALL

      public static final HierarchyScope ALL
      Every matching entity, whichever entity owns it.
    • ROOT

      public static final HierarchyScope ROOT
      The matching entities the store owns directly, with or without children of their own.
      See Also:
    • PARENT_ONLY

      public static final HierarchyScope PARENT_ONLY
      The matching entities that own at least one child.

      Entity add/remove callbacks do not report promotion or demotion. Use ArchetypeChunkSystem for notifications when tables enter or leave this scope.

    • CHILD_ONLY

      public static final HierarchyScope CHILD_ONLY
      The matching entities that another entity owns.
  • Method Details

    • values

      public static HierarchyScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HierarchyScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • includesChildlessRoots

      public boolean includesChildlessRoots()
      Returns:
      whether the scope holds an entity the store owns directly that owns no children.
    • includesParents

      public boolean includesParents()
      Returns:
      whether the scope holds an entity that owns children.
    • includesChildren

      public boolean includesChildren()
      Returns:
      whether the scope holds an entity that another entity owns.