Class Item
java.lang.Object
org.rspeer.game.component.Item
- All Implemented Interfaces:
Actionable, Defined<ItemDefinition>, Identifiable, Interactable, Nameable
public class Item
extends Object
implements Identifiable, Nameable, Interactable, Defined<ItemDefinition>
Represents an
Item in game-
Nested Class Summary
Nested classes/interfaces inherited from interface Actionable
Actionable.Query<Q>Nested classes/interfaces inherited from interface Identifiable
Identifiable.Query<Q>Nested classes/interfaces inherited from interface Nameable
Nameable.Query<Q> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Itemcombine(jag.oldscape.RSInventory inv, InterfaceComponent component, int index) static Itemdirect(boolean forceComponent, jag.oldscape.RSInventory inv, InterfaceComponent component) static Itemdirect(jag.oldscape.RSInventory inv, InterfaceComponent component) booleanstatic Itemfrom(InterfaceComponent component) intgetId()intgetIndex()getName()intgetParameter(int parameter) intgetParameter(ItemParameter parameter) String[]getSprite(int border, int shadow, int stackable, boolean noted) intString[]getSubMenuActions(int parentActionIndex) inthashCode()booleanisNoted()static booleanisNullId(int id) booleanbooleanbooleanstatic Itemparent(jag.oldscape.RSInventory inv, InterfaceComponent component) voidsetActionOverride(BiFunction<Item, String, MenuAction> actionOverride) voidsetActionSupplier(Function<Item, List<String>> actionSupplier) toString()static Itemunbound(int index, int id, int stackSize) Methods inherited from interface Actionable
containsAction, containsActionMethods inherited from interface Interactable
actionOf, interact, interact, interact
-
Constructor Details
-
Item
-
-
Method Details
-
unbound
-
combine
-
parent
-
from
-
direct
-
direct
public static Item direct(boolean forceComponent, jag.oldscape.RSInventory inv, InterfaceComponent component) -
isNullId
public static boolean isNullId(int id) -
getParameter
public int getParameter(int parameter) -
getParameter
-
getComponent
-
isUnbound
public boolean isUnbound() -
getName
-
getId
public int getId()- Specified by:
getIdin interfaceIdentifiable
-
getIndex
public int getIndex() -
getStackSize
public int getStackSize() -
getDefinition
- Specified by:
getDefinitionin interfaceDefined<ItemDefinition>
-
isStackable
public boolean isStackable() -
isNoted
public boolean isNoted() -
isPlaceholder
public boolean isPlaceholder() -
actionOf
- Specified by:
actionOfin interfaceInteractable
-
getRawActions
- Specified by:
getRawActionsin interfaceActionable
-
getSubMenuActions
- Specified by:
getSubMenuActionsin interfaceActionable
-
getActions
- Specified by:
getActionsin interfaceActionable
-
getSprite
- Parameters:
stackable- 0 = Never show item quantity number 1 = Always show item quantity number 2 = Only show item quantity number if it's greater than 1
-
toString
-
getBounds
-
equals
-
hashCode
-
setActionOverride
-
setActionSupplier
-