InventoryObject

Inventory object is a helper object built around the primitive 'long' type. We utilize longs directly here to reduce the effects of garbage creation via inventories, as this can otherwise get quite severe with a lot of players.

Properties

Link copied to clipboard
const val NULL: Long

Functions

Link copied to clipboard
fun getCount(packed: Long): Int
Link copied to clipboard
fun getId(packed: Long): Int
Link copied to clipboard
fun getSlot(packed: Long): Int
Link copied to clipboard
operator fun invoke(id: Int, count: Int): Long
operator fun invoke(slot: Int, id: Int, count: Int): Long
Link copied to clipboard
fun pack(id: Int, count: Int): Long
fun pack(slot: Int, id: Int, count: Int): Long