Skip to content
Devin Fritz edited this page May 23, 2024 · 2 revisions

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.

Building

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.

Rowlength & translations

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.

Translations to a parent inventory

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.

Utilities

Some helpful functions you can use are:

Inventories

Item management

Utility

Clone this wiki locally