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 Yplane- 0..3category- category id (e.g. 3032 for divination)spriteId- minimap sprite id, or0when noneelementId- element definition id (separate fromid— 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 emptyminLevel- minimum level shown on the element badge, or-1if nonelevelTier1- first level tier, or-1if nonelevelTier2- second level tier, or-1levelTier3- third level tier, or-1skillRequirements- skill requirements; defensively copiedresources- resource sections (ores/fish/logs/...); defensively copiedplacements- 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 Summary
ConstructorsConstructorDescriptionWorldMapElement(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 aWorldMapElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcategory()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord component.intReturns the value of theelementIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intReturns the value of thelevelTier1record component.intReturns the value of thelevelTier2record component.intReturns the value of thelevelTier3record component.intminLevel()Returns the value of theminLevelrecord component.name()Returns the value of thenamerecord component.Returns the value of theplacementsrecord component.intplane()Returns the value of theplanerecord component.Returns the value of theresourcesrecord component.Returns the value of theskillRequirementsrecord component.intspriteId()Returns the value of thespriteIdrecord component.inttileX()Returns the value of thetileXrecord component.inttileY()Returns the value of thetileYrecord component.tooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.
-
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 aWorldMapElementrecord class.- Parameters:
id- the value for theidrecord componenttileX- the value for thetileXrecord componenttileY- the value for thetileYrecord componentplane- the value for theplanerecord componentcategory- the value for thecategoryrecord componentspriteId- the value for thespriteIdrecord componentelementId- the value for theelementIdrecord componentname- the value for thenamerecord componenttooltip- the value for thetooltiprecord componentdescription- the value for thedescriptionrecord componentminLevel- the value for theminLevelrecord componentlevelTier1- the value for thelevelTier1record componentlevelTier2- the value for thelevelTier2record componentlevelTier3- the value for thelevelTier3record componentskillRequirements- the value for theskillRequirementsrecord componentresources- the value for theresourcesrecord componentplacements- the value for theplacementsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
tileX
-
tileY
-
plane
-
category
-
spriteId
-
elementId
-
name
-
tooltip
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
minLevel
-
levelTier1
public int levelTier1()Returns the value of thelevelTier1record component.- Returns:
- the value of the
levelTier1record component
-
levelTier2
public int levelTier2()Returns the value of thelevelTier2record component.- Returns:
- the value of the
levelTier2record component
-
levelTier3
public int levelTier3()Returns the value of thelevelTier3record component.- Returns:
- the value of the
levelTier3record component
-
skillRequirements
Returns the value of theskillRequirementsrecord component.- Returns:
- the value of the
skillRequirementsrecord component
-
resources
-
placements
Returns the value of theplacementsrecord component.- Returns:
- the value of the
placementsrecord component
-