blob: 3c95e45073a5ccd1c74e3f7e3763b26034475ddf (
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.OtherInventoryData
import net.minecraft.item.ItemStack
open class BaseInventoryOpenEvent(inventory: OtherInventoryData.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: OtherInventoryData.Inventory): BaseInventoryOpenEvent(inventory)
// Firing with items that are added later
class LateInventoryOpenEvent(inventory: OtherInventoryData.Inventory): BaseInventoryOpenEvent(inventory)
|