Package dev.twilite.game.wrapper
Class TileItem
java.lang.Object
dev.twilite.game.wrapper.BaseItem
dev.twilite.game.wrapper.TileItem
- All Implemented Interfaces:
Id,Interactable,InteractableUnit,Unit
Item stack on a world tile.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncoord()Returns this unit's world coordinate.fine()Returns this unit's fine coordinate, representing its model location.intid()Returns the item id.map()Returns this unit's map coordinate relative to the loaded world area.options()Returns ground item menu options.intReturns the ownership type.booleanselect()Enqueues the selected-use-on-item action.intReturns the stack size.booleantarget()Enqueues the selected-target-on-item action.world()Returns the world this unit belongs to.Methods inherited from class dev.twilite.game.wrapper.BaseItem
constantName, integerParameter, marketable, name, note, noted, objectParameter, placeholder, stackable, tradeable, unnoteMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.twilite.game.trait.Interactable
interact, optionMethods inherited from interface dev.twilite.game.trait.Unit
area, directPathTo, directPathTo, directPathTo, distanceTo, distanceTo, distanceTo, lineOfSightTo, lineOfSightTo, lineOfSightTo, lineOfWalkTo, lineOfWalkTo, lineOfWalkTo, manhattanDistanceTo, manhattanDistanceTo, manhattanDistanceTo, pathInDirection
-
Constructor Details
-
TileItem
Wraps a native tile-item provider.
-
-
Method Details
-
world
Description copied from interface:UnitReturns the world this unit belongs to. -
coord
Description copied from interface:UnitReturns this unit's world coordinate. -
fine
Description copied from interface:UnitReturns this unit's fine coordinate, representing its model location. -
map
Description copied from interface:UnitReturns this unit's map coordinate relative to the loaded world area. -
id
public int id()Description copied from class:BaseItemReturns the item id. -
stackSize
public int stackSize()Description copied from class:BaseItemReturns the stack size. -
ownershipType
public int ownershipType()Returns the ownership type. -
options
Returns ground item menu options.- Specified by:
optionsin interfaceInteractable
-
target
public boolean target()Enqueues the selected-target-on-item action.- Specified by:
targetin interfaceInteractable
-
select
public boolean select()Enqueues the selected-use-on-item action.- Specified by:
selectin interfaceInteractable
-