Package net.storm.api.domain.tiles
Interface ITileItem
- All Superinterfaces:
Identifiable,Interactable,Locatable,Nameable,net.runelite.api.Node,net.runelite.api.Renderable,RuneLiteWrapper<net.runelite.api.TileItem>,SceneEntity,TileEntity,net.runelite.api.TileItem
public interface ITileItem
extends net.runelite.api.TileItem, TileEntity, RuneLiteWrapper<net.runelite.api.TileItem>
Represents a ground item (loot) on a tile.
Tile items are items that have been dropped on the ground. They can be picked up by players and have various properties from their item definition.
Example usage:
ITileItem loot = TileItems.getNearest("Bones");
if (loot != null && loot.canPick()) {
loot.pickup();
}
- See Also:
-
Field Summary
Fields inherited from interface net.runelite.api.TileItem
OWNERSHIP_GROUP, OWNERSHIP_NONE, OWNERSHIP_OTHER, OWNERSHIP_SELF -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPick()Checks if this item can be picked up.net.runelite.api.ItemCompositionGets the item composition (definition) for this item.intGets the high alchemy value of this item.String[]Gets the inventory actions for this item type.intGets the world view ID this item belongs to.default booleanhasInventoryAction(String action) Checks if this item has a specific inventory action.Gets the inventory actions as a list.booleanChecks if this item is members-only.booleanisNoted()Checks if this item is in noted form.booleanChecks if this item is stackable.booleanChecks if this item is tradable.voidpickup()Picks up this item from the ground.Methods inherited from interface net.storm.api.domain.Identifiable
getIdMethods inherited from interface net.storm.api.domain.Interactable
generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, generateMenu, getActionIndex, getActions, getClickPoint, hasAction, hasAction, hasAction, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, interact, isInteractable, isInteractable, isInteractableMethods inherited from interface net.storm.api.domain.Locatable
distanceTo, distanceTo, distanceTo2DHypotenuse, distanceToHypotenuse, getLocalLocation, getPlane, getWorldLocation, getWorldX, getWorldYMethods inherited from interface net.runelite.api.Node
getHash, getNext, getPreviousMethods inherited from interface net.runelite.api.Renderable
getAnimationHeightOffset, getModel, getModelHeight, setModelHeightMethods inherited from interface net.storm.api.domain.RuneLiteWrapper
getWrappedMethods inherited from interface net.storm.api.domain.SceneEntity
getWorldViewMethods inherited from interface net.storm.api.domain.tiles.TileEntity
getTileMethods inherited from interface net.runelite.api.TileItem
getDespawnTime, getId, getOwnership, getQuantity, getVisibleTime, isPrivate
-
Method Details
-
canPick
boolean canPick()Checks if this item can be picked up.Items may not be pickable if they are instanced to another player, or if the inventory is full and the item doesn't stack.
- Returns:
- true if the item can be picked up
-
isTradable
boolean isTradable()Checks if this item is tradable.- Returns:
- true if the item can be traded
-
isStackable
boolean isStackable()Checks if this item is stackable.- Returns:
- true if the item stacks in inventory
-
isNoted
boolean isNoted()Checks if this item is in noted form.- Returns:
- true if the item is noted
-
isMembers
boolean isMembers()Checks if this item is members-only.- Returns:
- true if the item requires membership
-
getInventoryActions
String[] getInventoryActions()Gets the inventory actions for this item type.These are the actions that would be available if the item were in inventory.
- Returns:
- array of inventory action names
-
inventoryActions
Gets the inventory actions as a list.- Returns:
- list of inventory action names
-
hasInventoryAction
Checks if this item has a specific inventory action.- Parameters:
action- the action name to check- Returns:
- true if the action exists
-
pickup
void pickup()Picks up this item from the ground.This interacts with the "Take" action on the item.
-
getComposition
net.runelite.api.ItemComposition getComposition()Gets the item composition (definition) for this item.The composition contains metadata like name, examine text, and actions.
- Returns:
- the item composition
-
getHaPrice
int getHaPrice()Gets the high alchemy value of this item.- Returns:
- the high alchemy price in coins
-
getWorldViewId
int getWorldViewId()Gets the world view ID this item belongs to.- Returns:
- the world view ID
-