ITEMS
Registry for Katton items.
Supports both global registration (during mod initialization) and hot-reloadable registration (after the server has started). Items registered through this registry are tracked by their script owner and can be cleared during reload operations.
The registry handles the complexity of registering items after Minecraft's item registry is frozen by:
Temporarily unfreezing the registry
Injecting intrusive holders if needed
Registering the item
Restoring the registry state
Properties
Link copied to clipboard
open override val entries: MutableSet<MutableMap.MutableEntry<Identifier, KattonRegistry.KattonItemEntry>>
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Clears all managed entries. Called at the start of a reload.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Initializes this registry. Override to perform initialization logic.
Link copied to clipboard
fun newNative(components: KattonItemProperties, registerMode: RegisterMode = RegisterMode.AUTO, itemFactory: (KattonItemProperties) -> Item): KattonRegistry.KattonItemEntry
Registers a native Item instance with hot-reload support.
Link copied to clipboard
open override fun put(key: Identifier, value: KattonRegistry.KattonItemEntry): KattonRegistry.KattonItemEntry?
Link copied to clipboard