GenericItem

abstract class GenericItem : Interactive, Identifiable, Nameable

GenericItem

Constructors

GenericItem
Link copied to clipboard
fun GenericItem()

Functions

actions
Link copied to clipboard
abstract fun actions(): List<String>

The current actions for the entity.

basePoint
Link copied to clipboard
abstract override fun basePoint(): Point

{@inheritDoc}

boundingModel
Link copied to clipboard
fun boundingModel(): BoundingModel?

Gets the current bounding model

fun boundingModel(boundingModel: BoundingModel?)

Sets the bounding model

fun boundingModel(expectedModel: BoundingModel?, boundingModel: BoundingModel?)

Compares and sets the bounding model

bounds
Link copied to clipboard
open override fun bounds(arr: IntArray?)

Sets the boundaries of this entity utilizing an array.

abstract fun bounds(x1: Int, x2: Int, y1: Int, y2: Int, z1: Int, z2: Int)

Sets the boundaries of this entity.

calculateScreenPosition
Link copied to clipboard
abstract fun calculateScreenPosition(): Callable<Point>
centerPoint
Link copied to clipboard
abstract override fun centerPoint(): Point

{@inheritDoc}

click
Link copied to clipboard
open override fun click(): Boolean
open override fun click(action: String?): Boolean
open override fun click(action: String?, option: String?): Boolean
open override fun click(f: Filter<MenuCommand>, useMenu: Boolean): Boolean

{@inheritDoc}

open override fun click(f: (MenuCommand) -> Boolean): Boolean
contains
Link copied to clipboard
abstract operator fun contains(point: Point?): Boolean

Whether or not the entity contains the point.

cosmetic
Link copied to clipboard
fun cosmetic(): Boolean

Whether or not the item is a cosmetic.

doSetBounds
Link copied to clipboard
fun doSetBounds(arr: IntArray?): Filter<Interactable?>
draw
Link copied to clipboard
abstract fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

groundActions
Link copied to clipboard
fun groundActions(): List<String>

An array of the possible actions if the item were on the ground.

id
Link copied to clipboard
abstract fun id(): Int

The identifier of this entity

interact
Link copied to clipboard
open override fun interact(action: String?): Boolean
open override fun interact(f: (MenuCommand) -> Boolean): Boolean
open override fun interact(f: Filter<MenuCommand>): Boolean
open override fun interact(action: String?, hasMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?): Boolean
open override fun interact(f: (MenuCommand) -> Boolean, useMenu: Boolean): Boolean
open override fun interact(f: Filter<MenuCommand>, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?, hasMenu: Boolean): Boolean

{@inheritDoc}

inventoryActions
Link copied to clipboard
fun inventoryActions(): List<String>

An array of the possible actions if the item were in the inventory.

inViewport
Link copied to clipboard
open override fun inViewport(): Boolean

{@inheritDoc}

open override fun inViewport(checkIfObstructed: Boolean): Boolean

Returns true if the object is currently rendered in the viewport.

members
Link copied to clipboard
fun members(): Boolean

Whether or not the item is a members' item.

modelId
Link copied to clipboard
fun modelId(): Int

The model ID of the item.

name
Link copied to clipboard
open override fun name(): String
nextPoint
Link copied to clipboard
abstract fun nextPoint(): Point

The next game screen point of the entity.

noted
Link copied to clipboard
fun noted(): Boolean

Whether or not the item is in banknote form.

price
Link copied to clipboard
fun price(): Int
stackable
Link copied to clipboard
fun stackable(): Boolean

Whether or not the item is stackable.

tradeable
Link copied to clipboard
fun tradeable(): Boolean

Whether or not the item is tradeable.

triangles
Link copied to clipboard
open override fun triangles(): Array<Polygon>

The translated model triangles.

valid
Link copied to clipboard
open override fun valid(): Boolean
value
Link copied to clipboard
fun value(): Int

The value of the item which would appear in most shops. This may be used to also grab the high/low alchemy value, as well.

Properties

boundingModel
Link copied to clipboard
var boundingModel: AtomicReference<BoundingModel?>
cachedConfig
Link copied to clipboard
val cachedConfig: IItemConfig?
config
Link copied to clipboard
val config: CacheItemConfig

Inheritors

GroundItem
Link copied to clipboard
Item
Link copied to clipboard