Record Class SceneObjectInfo

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.SceneObjectInfo
Record Components:
handle - opaque server-side handle for action queueing
typeId - the loc id the server sent — what identity, hardcoded id sets and interaction are keyed on
resolvedId - the loc id a definition lookup must use: typeId with the morphvarp ("multiloc") transform applied by the producer. Equal to typeId for a loc that does not morph. Use getLocationType on this id — a morph loc's base definition has an empty name and no options at all.
tileX - absolute world tile X
tileY - absolute world tile Y
plane - 0..3
name - pre-resolved display name (may be empty)
options - pre-resolved right-click options (may be empty)
shape - scenery shape code as published on the wire (wall, wall decoration, ground decoration, centrepiece, ...), or UNKNOWN_SHAPE when the source of this row did not carry one
rotation - quarter turns 0..3 applied to the loc's model, or UNKNOWN_ROTATION when the source of this row did not carry one

public record SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation) extends Record
Wire-format record returned by query_locations for one live scene object. Pre-resolved fields ride on the response so the Java side can answer position/distance queries without a per-object cache lookup; SceneObject additionally pulls the full LocationType (size, varbits, params) on demand.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    rotation() for a row built without one.
    static final int
    shape() for a row built without one.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options)
    Builds a row that carries no shape or rotation.
    SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation)
    Creates an instance of a SceneObjectInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the handle record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the name record component.
    Returns the value of the options record component.
    int
    Returns the value of the plane record component.
    int
    Returns the value of the resolvedId record component.
    int
    Returns the value of the rotation record component.
    int
    Returns the value of the shape record component.
    int
    Returns the value of the tileX record component.
    int
    Returns the value of the tileY record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the typeId record component.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • UNKNOWN_SHAPE

      public static final int UNKNOWN_SHAPE
      shape() for a row built without one. Never published by the producer.
      See Also:
    • UNKNOWN_ROTATION

      public static final int UNKNOWN_ROTATION
      rotation() for a row built without one. Never published by the producer.
      See Also:
  • Constructor Details

    • SceneObjectInfo

      public SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation)
      Creates an instance of a SceneObjectInfo record class.
      Parameters:
      handle - the value for the handle record component
      typeId - the value for the typeId record component
      resolvedId - the value for the resolvedId record component
      tileX - the value for the tileX record component
      tileY - the value for the tileY record component
      plane - the value for the plane record component
      name - the value for the name record component
      options - the value for the options record component
      shape - the value for the shape record component
      rotation - the value for the rotation record component
    • SceneObjectInfo

      public SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options)
      Builds a row that carries no shape or rotation. Kept so callers written before those fields existed compile unchanged; both read back as their UNKNOWN_* sentinel.
  • Method Details

    • 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 the compare method from their corresponding wrapper classes.
      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.
    • handle

      public int handle()
      Returns the value of the handle record component.
      Returns:
      the value of the handle record component
    • typeId

      public int typeId()
      Returns the value of the typeId record component.
      Returns:
      the value of the typeId record component
    • resolvedId

      public int resolvedId()
      Returns the value of the resolvedId record component.
      Returns:
      the value of the resolvedId record component
    • tileX

      public int tileX()
      Returns the value of the tileX record component.
      Returns:
      the value of the tileX record component
    • tileY

      public int tileY()
      Returns the value of the tileY record component.
      Returns:
      the value of the tileY record component
    • plane

      public int plane()
      Returns the value of the plane record component.
      Returns:
      the value of the plane record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • options

      public List<String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component
    • shape

      public int shape()
      Returns the value of the shape record component.
      Returns:
      the value of the shape record component
    • rotation

      public int rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component