blob: aec3e6542510d5317b1f1d00fa4d07f0eacbc768 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package at.hannibal2.skyhanni.events
import at.hannibal2.skyhanni.data.InventoryData
import net.minecraft.item.ItemStack
open class BaseInventoryOpenEvent(inventory: InventoryData.Inventory): LorenzEvent() {
val inventoryId: Int by lazy { inventory.windowId }
val inventoryName: String by lazy {inventory.title }
val inventorySize: Int by lazy {inventory.slotCount }
val inventoryItems: MutableMap<Int, ItemStack> by lazy {inventory.items }
}
class InventoryOpenEvent(inventory: InventoryData.Inventory): BaseInventoryOpenEvent(inventory)
// Firing with items that are added later
class LateInventoryOpenEvent(inventory: InventoryData.Inventory): BaseInventoryOpenEvent(inventory)
|