KattonRegistry

Central registry for Katton mod components.

This object provides a unified interface for registering custom game objects such as items, blocks, and mob effects. It supports both traditional global registration and hot-reloadable registration for script-defined content.

The registry uses a custom approach to handle registration after Minecraft's registries are frozen, temporarily unfreeze registries and inject intrusive holders as needed.

Types

Link copied to clipboard
Link copied to clipboard
object COMPONENTS

Custom data component types for Katton.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class KattonBlockEntry(val id: Identifier, val block: Block) : Identifiable

Represents a registered block entry.

Link copied to clipboard
data class KattonItemEntry(val id: Identifier, val item: Item, properties: KattonItemProperties? = null) : Identifiable

Represents a registered item entry.

Link copied to clipboard
data class KattonMobEffectEntry(val id: Identifier, val effect: MobEffect) : Identifiable

Represents a registered mob effect entry.

Link copied to clipboard
abstract class KattonRegistries<T : Identifiable>(val id: Identifier, entries: MutableMap<Identifier, T> = mutableMapOf()) : Identifiable, MutableMap<Identifier, T>

Base class for Katton registries.

Functions

Link copied to clipboard

Initializes all Katton registries.