kotlin
@ApiStatus.Experimental
@ApiStatus.Experimental fun registerNativeItem(id: String, registerMode: RegisterMode = RegisterMode.AUTO, configure: KattonItemProperties.() -> Unit = {}, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntryRegisters 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.
Parameters
| Parameter | Description |
|---|---|
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 |
Returns
The registered KattonItemEntry