Companion

object Companion

Properties

Link copied to clipboard
val ITEM_KEY: NamespacedKey

Persistent-data key under which every generated stack stores its namespaced name.

Link copied to clipboard

Read-only registry of all constructed items, keyed by their getNamespacedName.

Functions

Link copied to clipboard
fun equalByMaterial(item1: ItemStack?, item2: ItemStack?): Boolean

Whether two stacks share the same Material (ignores custom identity).

Link copied to clipboard
fun equalByNamespacedKey(item1: ItemStack?, item2: ItemStack?): Boolean

Whether both stacks carry the same framework namespaced key; false if either lacks one.

fun equalByNamespacedKeyIfExistElseByMaterial(item1: ItemStack?, item2: ItemStack?): Boolean

Compares by namespaced key when both stacks have one, otherwise falls back to equalByMaterial. Lets custom items and vanilla items be matched uniformly.

Link copied to clipboard

Looks up a registered EffectiveItem by its namespaced name, or null if unknown.

Link copied to clipboard
fun getGrayLore(lines: List<String>): List<Component>

Wraps each line as a non-italic gray lore Component.

Link copied to clipboard
fun getItemByNamespacedKey(namespacedKey: String): ItemStack?

Builds a fresh stack for the item registered under namespacedKey, or null if unknown.

Link copied to clipboard
fun getNamespacedKeyByItem(item: ItemStack?): String?

Reads the framework namespaced name stored on item, or null for vanilla/empty stacks.

Link copied to clipboard

Namespaced name of item if it is a custom item, otherwise its Material name.