Class Definitions

java.lang.Object
org.rspeer.game.Definitions

public class Definitions extends Object
  • Constructor Details

    • Definitions

      public Definitions()
  • Method Details

    • populate

      public static void populate()
      Loads and caches game definitions. Please note that this function is intended for internal use only
    • getTransformable

      public static <K extends DefinitionWithParam, T extends TransformableDefinition<K>> T getTransformable(int id, Class<T> type)
    • getEnum

      public static EnumDefinition getEnum(int id)
    • getVarpbit

      public static Varpbit getVarpbit(int id)
    • getNpc

      public static NpcDefinition getNpc(int id)
    • getObject

      public static ObjectDefinition getObject(int id)
    • getItem

      public static ItemDefinition getItem(int id)
    • getItem

      public static ItemDefinition getItem(String name, Predicate<ItemDefinition> predicate)
      Gets an ItemDefinition by name matching the given predicate
      Parameters:
      name - The name of the item, or null to not match by name
      predicate - Predicate to select the item
      Returns:
      The first ItemDefinition with the given name matching the predicate
    • getFuzzyItem

      public static ItemDefinition getFuzzyItem(String name, Predicate<ItemDefinition> predicate)
    • getMaxConsumableFuzzyItem

      public static ItemDefinition getMaxConsumableFuzzyItem(String name)

      4 dose infixes: " potion", " brew", "super ", " balm", "serum" "venom" "poison", " balance", "antifire", " remedy", "antidote", " rest

      2 dose infixes: " mix", "supermix"

      8 dose infixes: "ring of duel", "games necklace", "watering can"

      6 dose infixes: "amulet of glory", "skills necklace", "combat bracelet"

      5 dose infixes: "ring of wealth", "necklace of passage", "burning amulet", "ring of returning

      Parameters:
      name - The item key, doses/charges stripped
      Returns:
      The ItemDefinition of the max consumable item if found, otherwise returns the highest ID match
    • getItems

      public static Map<Integer, ItemDefinition> getItems()