InventoryObject

value class InventoryObject(val packed: Long)

Inventory objects are a value class around the primitive 'long' to efficiently compress an inventory's contents into a long array. This allows us to avoid any garbage creation that would otherwise be created by making lists of objs repeatedly.

Constructors

Link copied to clipboard
constructor(slot: Int, id: Int, count: Int)
constructor(id: Int, count: Int)
constructor(packed: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val count: Int
Link copied to clipboard
val id: Int
Link copied to clipboard
Link copied to clipboard
val slot: Int

Functions

Link copied to clipboard
open override fun toString(): String