Class TileItem

java.lang.Object
dev.twilite.game.wrapper.BaseItem
dev.twilite.game.wrapper.TileItem
All Implemented Interfaces:
Id, Interactable, InteractableUnit, Unit

public class TileItem extends BaseItem implements InteractableUnit
Item stack on a world tile.
  • Constructor Details

    • TileItem

      public TileItem(dev.twilite.game.internal.memory.RSTileItem memory, World world)
      Wraps a native tile-item provider.
  • Method Details

    • world

      public World world()
      Description copied from interface: Unit
      Returns the world this unit belongs to.
      Specified by:
      world in interface Unit
    • coord

      public Coord coord()
      Description copied from interface: Unit
      Returns this unit's world coordinate.
      Specified by:
      coord in interface Unit
    • fine

      public Coord.Fine fine()
      Description copied from interface: Unit
      Returns this unit's fine coordinate, representing its model location.
      Specified by:
      fine in interface Unit
    • map

      public Coord.Map map()
      Description copied from interface: Unit
      Returns this unit's map coordinate relative to the loaded world area.
      Specified by:
      map in interface Unit
    • id

      public int id()
      Description copied from class: BaseItem
      Returns the item id.
      Specified by:
      id in interface Id
      Specified by:
      id in class BaseItem
    • stackSize

      public int stackSize()
      Description copied from class: BaseItem
      Returns the stack size.
      Specified by:
      stackSize in class BaseItem
    • ownershipType

      public int ownershipType()
      Returns the ownership type.
    • options

      public List<MenuOption> options()
      Returns ground item menu options.
      Specified by:
      options in interface Interactable
    • target

      public boolean target()
      Enqueues the selected-target-on-item action.
      Specified by:
      target in interface Interactable
    • select

      public boolean select()
      Enqueues the selected-use-on-item action.
      Specified by:
      select in interface Interactable