Record Class LocationType

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.LocationType
Record Components:
id - the location type ID
name - the location display name
sizeX - the X dimension in tiles
sizeY - the Y dimension in tiles
interactType - the interaction type
solidType - the collision/solid type
members - whether this is members-only
options - the right-click interaction options
varbitId - the varbit controlling transformation, or -1 if none
varpId - the varp controlling transformation, or -1 if none
transforms - the list of type IDs this location can transform into
mapSpriteId - the minimap sprite ID, or 0 if none
params - additional key-value parameters from the location definition

public record LocationType(int id, String name, int sizeX, int sizeY, int interactType, int solidType, boolean members, List<String> options, int varbitId, int varpId, List<Integer> transforms, int mapSpriteId, Map<String,Object> params) extends Record
Location (game object) definition from the game cache.
See Also:
  • Constructor Details

    • LocationType

      public LocationType(int id, String name, int sizeX, int sizeY, int interactType, int solidType, boolean members, List<String> options, int varbitId, int varpId, List<Integer> transforms, int mapSpriteId, Map<String,Object> params)
      Creates an instance of a LocationType record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      sizeX - the value for the sizeX record component
      sizeY - the value for the sizeY record component
      interactType - the value for the interactType record component
      solidType - the value for the solidType record component
      members - the value for the members record component
      options - the value for the options record component
      varbitId - the value for the varbitId record component
      varpId - the value for the varpId record component
      transforms - the value for the transforms record component
      mapSpriteId - the value for the mapSpriteId record component
      params - the value for the params record component
  • 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.
    • id

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

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

      public int sizeX()
      Returns the value of the sizeX record component.
      Returns:
      the value of the sizeX record component
    • sizeY

      public int sizeY()
      Returns the value of the sizeY record component.
      Returns:
      the value of the sizeY record component
    • interactType

      public int interactType()
      Returns the value of the interactType record component.
      Returns:
      the value of the interactType record component
    • solidType

      public int solidType()
      Returns the value of the solidType record component.
      Returns:
      the value of the solidType record component
    • members

      public boolean members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component
    • options

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

      public int varbitId()
      Returns the value of the varbitId record component.
      Returns:
      the value of the varbitId record component
    • varpId

      public int varpId()
      Returns the value of the varpId record component.
      Returns:
      the value of the varpId record component
    • transforms

      public List<Integer> transforms()
      Returns the value of the transforms record component.
      Returns:
      the value of the transforms record component
    • mapSpriteId

      public int mapSpriteId()
      Returns the value of the mapSpriteId record component.
      Returns:
      the value of the mapSpriteId record component
    • params

      public Map<String,Object> params()
      Returns the value of the params record component.
      Returns:
      the value of the params record component