InventoryAction

Types

Link copied to clipboard
data class Chain(val inventoryConstraints: InventoryConstraints, val actions: List<InventoryAction>, val priority: Priority) : Record

A chained inventory action is a list of inventory actions that have to be executed in order and CANNOT be stopped in between

Link copied to clipboard
data class Click(val screen: AbstractContainerScreen<*>? = null, val slot: ItemSlot, val button: Int, val actionType: ClickType) : InventoryAction, Record
Link copied to clipboard
data class CloseScreen(val screen: AbstractContainerScreen<*>) : InventoryAction, Record
Link copied to clipboard
data class Creative(val itemStack: ItemStack, val slot: ItemSlot? = null) : InventoryAction, Record
Link copied to clipboard
data class UseItem @JvmOverloads constructor(val hotbarItemSlot: HotbarItemSlot, val requester: Any? = null) : InventoryAction, Record

Functions

Link copied to clipboard
abstract fun canPerformAction(inventoryConstraints: InventoryConstraints): Boolean
Link copied to clipboard
abstract fun performAction(): Boolean
Link copied to clipboard