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:
  • 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

      default List<String> inventoryActions()
      Gets the inventory actions as a list.
      Returns:
      list of inventory action names
    • hasInventoryAction

      default boolean hasInventoryAction(String action)
      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