IndexedObjectProvider

abstract class IndexedObjectProvider(indices: Iterator<Int>)

An object provider interface is used to acquire the objs that exist in different inventories. These objs are bit-packed into a long, which gets further placed into a long array. This is all in order to avoid garbage creation with inventories, as this can be a considerable hot-spot for that.

Constructors

Link copied to clipboard
constructor(indices: Iterator<Int>)

Functions

Link copied to clipboard
abstract fun provide(slot: Int): Long

Provides an InventoryObject for a given slot in inventory. If there is no object in that slot, use InventoryObject.NULL as an indicator of it.