registerNativeItem

@ApiStatus.Experimental
fun registerNativeItem(id: String, registerMode: RegisterMode = RegisterMode.AUTO, configure: KattonItemProperties.() -> Unit = {}, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntry

Registers a native Item with hot-reload support.

This is the primary API for registering custom Item subclasses from scripts. The item will be registered in the global Minecraft registry with full hot-reload capability.

Return

The registered KattonItemEntry

Parameters

id

Item identifier (e.g., "mymod:my_item")

registerMode

Registration mode (GLOBAL, RELOADABLE, or AUTO)

configure

Configuration lambda for item properties

itemFactory

Factory function to create the Item instance


@ApiStatus.Experimental
fun registerNativeItem(id: Identifier, registerMode: RegisterMode = RegisterMode.AUTO, configure: KattonItemProperties.() -> Unit = {}, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntry

Registers a native Item with hot-reload support.

Return

The registered KattonItemEntry

Parameters

id

Item identifier

registerMode

Registration mode

configure

Configuration lambda for item properties

itemFactory

Factory function to create the Item instance


@ApiStatus.Experimental
fun registerNativeItem(id: String, properties: KattonItemProperties, registerMode: RegisterMode = RegisterMode.AUTO, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntry

Registers a native Item with pre-configured properties.

Return

The registered KattonItemEntry

Parameters

id

Item identifier

properties

Pre-configured item properties

registerMode

Registration mode

itemFactory

Factory function to create the Item instance