Package org.rspeer.game
Class Definitions
- java.lang.Object
-
- org.rspeer.game.Definitions
-
public class Definitions extends Object
-
-
Constructor Summary
Constructors Constructor Description Definitions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RSEnumDefinition
getEnum(int id)
static ItemDefinition
getFuzzyItem(String name, Predicate<ItemDefinition> predicate)
static ItemDefinition
getItem(int id)
static ItemDefinition
getItem(String name, Predicate<ItemDefinition> predicate)
Gets anItemDefinition
by name matching the given predicatestatic Map<Integer,ItemDefinition>
getItems()
static NpcDefinition
getNpc(int id)
static Map<Integer,NpcDefinition>
getNpcs()
static ObjectDefinition
getObject(int id)
static Map<Integer,ObjectDefinition>
getObjects()
static <K extends RSTransformableDefinition,T extends TransformableDefinition<K,T>>
TgetTransformable(int id, Class<T> type)
static RSVarpbit
getVarpbit(int id)
static void
populate()
Loads and caches game definitions.
-
-
-
Method Detail
-
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 RSTransformableDefinition,T extends TransformableDefinition<K,T>> T getTransformable(int id, Class<T> type)
-
getEnum
public static RSEnumDefinition getEnum(int id)
-
getVarpbit
public static RSVarpbit 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 anItemDefinition
by name matching the given predicate- Parameters:
name
- The name of the item, ornull
to not match by namepredicate
- 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)
-
getObjects
public static Map<Integer,ObjectDefinition> getObjects()
-
getItems
public static Map<Integer,ItemDefinition> getItems()
-
getNpcs
public static Map<Integer,NpcDefinition> getNpcs()
-
-