Class Definitions
java.lang.Object
org.rspeer.game.Definitions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumDefinitiongetEnum(int id) static ItemDefinitiongetFuzzyItem(String name, Predicate<ItemDefinition> predicate) static ItemDefinitiongetItem(int id) static ItemDefinitiongetItem(String name, Predicate<ItemDefinition> predicate) Gets anItemDefinitionby name matching the given predicatestatic Map<Integer, ItemDefinition> getItems()static ItemDefinition4 dose infixes:" potion", " brew", "super ", " balm", "serum" "venom" "poison", " balance", "antifire", " remedy", "antidote", " reststatic NpcDefinitiongetNpc(int id) static ObjectDefinitiongetObject(int id) static <K extends DefinitionWithParam, T extends TransformableDefinition<K>>
TgetTransformable(int id, Class<T> type) static VarpbitgetVarpbit(int id) static voidpopulate()Loads and caches game definitions.
-
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
-
getVarpbit
-
getNpc
-
getObject
-
getItem
-
getItem
Gets anItemDefinitionby name matching the given predicate- Parameters:
name- The name of the item, ornullto not match by namepredicate- Predicate to select the item- Returns:
- The first
ItemDefinitionwith the given name matching the predicate
-
getFuzzyItem
-
getMaxConsumableFuzzyItem
4 dose infixes:
" potion", " brew", "super ", " balm", "serum" "venom" "poison", " balance", "antifire", " remedy", "antidote", " rest2 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
-