common • net.kernelpanicsoft.archie.transfer • ArchieItemSlot
ArchieItemSlot
@Serializable(with = ArchieItemSlot.Serializer::class)class ArchieItemSlot(onUpdate: () -> Unit = {}) : StorageSlot<ItemResource> , UpdateManager<NbtTag> Constructors
ArchieItemSlot
constructor(stack: ItemStack = ItemStack.EMPTY, onUpdate: () -> Unit = {})constructor(resourceStack: ResourceStack<ItemResource>, onUpdate: () -> Unit = {})constructor(onUpdate: () -> Unit = {})Types
Serializer
object Serializer : KSerializer<ArchieItemSlot> Functions
createSnapshot
open override fun createSnapshot(): NbtTagextract
getAmount
getContents
open fun getContents(): ResourceStack<ItemResource>getItem
fun getItem(): ItemStackgetLimit
getMaxStackSize
fun getMaxStackSize(): IntgetResource
open override fun getResource(): ItemResourceinsert
isResourceValid
open override fun isResourceValid(unit: ItemResource): BooleanreadSnapshot
open override fun readSnapshot(snapshot: NbtTag)remove
set
fun set(value: ItemStack)update
open override fun update()