newNative

fun newNative(components: KattonItemProperties, registerMode: RegisterMode = RegisterMode.AUTO, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntry

Registers a native Item instance with hot-reload support.

Use this method to register custom Item subclasses from scripts. The method handles all the complexity of late registration and hot-reload support automatically.

If called before the mod is fully initialized, the registration will be queued and processed later.

Return

The registered KattonItemEntry

Parameters

components

The item properties containing id, name, model, etc.

registerMode

The registration mode (GLOBAL, RELOADABLE, or AUTO)

itemFactory

Factory function to create the Item instance