Record Class WorldMapElement

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.WorldMapElement
Record Components:
id - element id (cache-resident)
tileX - absolute tile X (canonical placement)
tileY - absolute tile Y
plane - 0..3
category - category id (e.g. 3032 for divination)
spriteId - minimap sprite id, or 0 when none
elementId - element definition id (separate from id — the cache splits "where" from "what")
name - display name (e.g. "Bank")
tooltip - tooltip text (e.g. "Grand Exchange bank")
description - free-form description (e.g. "Mining Guild"); may be empty
minLevel - minimum level shown on the element badge, or -1 if none
levelTier1 - first level tier, or -1 if none
levelTier2 - second level tier, or -1
levelTier3 - third level tier, or -1
skillRequirements - skill requirements; defensively copied
resources - resource sections (ores/fish/logs/...); defensively copied
placements - every absolute tile placement for this element; defensively copied

public record WorldMapElement(int id, int tileX, int tileY, int plane, int category, int spriteId, int elementId, String name, String tooltip, String description, int minLevel, int levelTier1, int levelTier2, int levelTier3, List<SkillRequirement> skillRequirements, List<ResourceSection> resources, List<WorldMapPlacement> placements) extends Record
A world-map element from the game cache. These are static map features (banks, altars, divination spots, mining nodes, ...) with absolute tile coordinates, skill requirements, and resource breakdowns. Returned by queryWorldMapElements and by the WorldMapElements facade.

Unlike SceneObject (live runtime data) this is cache-resident; queries hit the producer once and the result is stable until a game update changes the cache.

  • Constructor Details

    • WorldMapElement

      public WorldMapElement(int id, int tileX, int tileY, int plane, int category, int spriteId, int elementId, String name, String tooltip, String description, int minLevel, int levelTier1, int levelTier2, int levelTier3, List<SkillRequirement> skillRequirements, List<ResourceSection> resources, List<WorldMapPlacement> placements)
      Creates an instance of a WorldMapElement record class.
      Parameters:
      id - the value for the id 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
      category - the value for the category record component
      spriteId - the value for the spriteId record component
      elementId - the value for the elementId record component
      name - the value for the name record component
      tooltip - the value for the tooltip record component
      description - the value for the description record component
      minLevel - the value for the minLevel record component
      levelTier1 - the value for the levelTier1 record component
      levelTier2 - the value for the levelTier2 record component
      levelTier3 - the value for the levelTier3 record component
      skillRequirements - the value for the skillRequirements record component
      resources - the value for the resources record component
      placements - the value for the placements 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
    • 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
    • category

      public int category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • spriteId

      public int spriteId()
      Returns the value of the spriteId record component.
      Returns:
      the value of the spriteId record component
    • elementId

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

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

      public String tooltip()
      Returns the value of the tooltip record component.
      Returns:
      the value of the tooltip record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • minLevel

      public int minLevel()
      Returns the value of the minLevel record component.
      Returns:
      the value of the minLevel record component
    • levelTier1

      public int levelTier1()
      Returns the value of the levelTier1 record component.
      Returns:
      the value of the levelTier1 record component
    • levelTier2

      public int levelTier2()
      Returns the value of the levelTier2 record component.
      Returns:
      the value of the levelTier2 record component
    • levelTier3

      public int levelTier3()
      Returns the value of the levelTier3 record component.
      Returns:
      the value of the levelTier3 record component
    • skillRequirements

      public List<SkillRequirement> skillRequirements()
      Returns the value of the skillRequirements record component.
      Returns:
      the value of the skillRequirements record component
    • resources

      public List<ResourceSection> resources()
      Returns the value of the resources record component.
      Returns:
      the value of the resources record component
    • placements

      public List<WorldMapPlacement> placements()
      Returns the value of the placements record component.
      Returns:
      the value of the placements record component