Class ExactArchetypeQuery<ECS_TYPE>

java.lang.Object
com.hypixel.hytale.component.query.ExactArchetypeQuery<ECS_TYPE>
Type Parameters:
ECS_TYPE - The type of the ECS.
All Implemented Interfaces:
Query<ECS_TYPE>

public class ExactArchetypeQuery<ECS_TYPE> extends Object implements Query<ECS_TYPE>
A query type that matches an exact archetype.
  • Constructor Details

    • ExactArchetypeQuery

      public ExactArchetypeQuery(@Nonnull Archetype<ECS_TYPE> archetype)
      Default Constructor for an ExactArchetypeQuery instance.
      Parameters:
      archetype - The archetype to match exactly.
  • Method Details

    • getArchetype

      public Archetype<ECS_TYPE> getArchetype()
    • test

      public boolean test(@Nonnull Archetype<ECS_TYPE> archetype)
      Description copied from interface: Query
      Controls if this query should process the provided Archetype.
      Specified by:
      test in interface Query<ECS_TYPE>
      Returns:
      true if the archetype should be processed by this query.
    • requiresComponentType

      public boolean requiresComponentType(@Nonnull ComponentType<ECS_TYPE,?> componentType)
      Description copied from interface: Query
      Controls if a query requires a component and so if used by a system it should be automatically unregistered if a component type is removed.
      Specified by:
      requiresComponentType in interface Query<ECS_TYPE>
      Returns:
      true if the componentType is required.
    • validateRegistry

      public void validateRegistry(@Nonnull ComponentRegistry<ECS_TYPE> registry)
      Description copied from interface: Query
      Validates that the provided ComponentRegistry is compatible with this query.
      Specified by:
      validateRegistry in interface Query<ECS_TYPE>
      Parameters:
      registry - The component registry to validate against.
    • validate

      public void validate()
      Description copied from interface: Query
      Validates the internal state of this query.
      Specified by:
      validate in interface Query<ECS_TYPE>