Record Class QueryEntities.Command

java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.QueryEntities.Command
Record Components:
requestId - Correlation identifier matching the response's requestId.
worldName - Name of the world to query.
entityTypeKey - Optional namespaced entity type key to filter by (e.g. minecraft:block_display).
bounded - Whether the six bound coordinates constrain the query; when false they are ignored.
minX - Minimum block X (inclusive) when bounded.
minY - Minimum block Y (inclusive) when bounded.
minZ - Minimum block Z (inclusive) when bounded.
maxX - Maximum block X (inclusive) when bounded.
maxY - Maximum block Y (inclusive) when bounded.
maxZ - Maximum block Z (inclusive) when bounded.
countOnly - When true the response carries only the count, skipping the per-entity payloads — the cheap probe shape for retrying assertions.
All Implemented Interfaces:
IAgentCommand<QueryEntities.Response>
Enclosing class:
QueryEntities

public static record QueryEntities.Command(String requestId, String worldName, @Nullable String entityTypeKey, boolean bounded, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean countOnly) extends Record implements IAgentCommand<QueryEntities.Response>
Command record for QUERY_ENTITIES.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Command(String requestId, String worldName, @Nullable String entityTypeKey, boolean bounded, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean countOnly)
    Validates command inputs.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the bounded record component.
    boolean
    Returns the value of the countOnly record component.
    @Nullable String
    Returns the value of the entityTypeKey record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxX record component.
    int
    Returns the value of the maxY record component.
    int
    Returns the value of the maxZ record component.
    int
    Returns the value of the minX record component.
    int
    Returns the value of the minY record component.
    int
    Returns the value of the minZ record component.
    Returns the value of the requestId record component.
    Returns the concrete response class for this command, used by the client to deserialize typed responses.
    final String
    Returns a string representation of this record class.
    Returns the value of the worldName record component.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Command

      public Command(String requestId, String worldName, @Nullable String entityTypeKey, boolean bounded, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean countOnly)
      Validates command inputs.
  • Method Details

    • responseType

      public Class<QueryEntities.Response> responseType()
      Description copied from interface: IAgentCommand
      Returns the concrete response class for this command, used by the client to deserialize typed responses.
      Specified by:
      responseType in interface IAgentCommand<QueryEntities.Response>
      Returns:
      Non-null response class token.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • requestId

      public String requestId()
      Returns the value of the requestId record component.
      Specified by:
      requestId in interface IAgentCommand<QueryEntities.Response>
      Returns:
      the value of the requestId record component
    • worldName

      public String worldName()
      Returns the value of the worldName record component.
      Returns:
      the value of the worldName record component
    • entityTypeKey

      public @Nullable String entityTypeKey()
      Returns the value of the entityTypeKey record component.
      Returns:
      the value of the entityTypeKey record component
    • bounded

      public boolean bounded()
      Returns the value of the bounded record component.
      Returns:
      the value of the bounded record component
    • minX

      public int minX()
      Returns the value of the minX record component.
      Returns:
      the value of the minX record component
    • minY

      public int minY()
      Returns the value of the minY record component.
      Returns:
      the value of the minY record component
    • minZ

      public int minZ()
      Returns the value of the minZ record component.
      Returns:
      the value of the minZ record component
    • maxX

      public int maxX()
      Returns the value of the maxX record component.
      Returns:
      the value of the maxX record component
    • maxY

      public int maxY()
      Returns the value of the maxY record component.
      Returns:
      the value of the maxY record component
    • maxZ

      public int maxZ()
      Returns the value of the maxZ record component.
      Returns:
      the value of the maxZ record component
    • countOnly

      public boolean countOnly()
      Returns the value of the countOnly record component.
      Returns:
      the value of the countOnly record component