-
Notifications
You must be signed in to change notification settings - Fork 0
KRow
KRows are an content container, which can be used to easier manage inventories. They offer some utility function, to manage items inside a row. KRows are in simple, just a another holder for items, but can then be set into a parent inventory, and make your code a bit less boilerplate.
To build a row, using the default implementation you can use the kRow method builder like the following:
val kRow = kRow {
//your config here
}
The name attribute inside the row, is currently unused, and might be removed in the future.
The rowlength of a KRow varies with the parent inventory. By default, there is no length of the rows, and therefore the items are just mapped to their slot. The actual row length, is determined by the parent inventory, if there is one.
To actually translate a kRow into a kInventory, use the setRow function of the kInventory. The default implementations will then translate the row correctly into the inventory.
Some helpful functions you can use are: