Skip to content
On this page
Common

BlockEntityType

top.katton.api.registrycommon/src/main/kotlin/top/katton/api/registry/BlockEntityType.kt
Registers a native BlockEntityType with hot-reload support.

registerNativeBlockEntityType

registerNativeBlockEntityTypeCommonFunction
kotlin
fun registerNativeBlockEntityType(id: String, registerMode: RegisterMode = RegisterMode.WORLD, blockEntityTypeFactory: () -> BlockEntityType<*>): KattonRegistry.KattonBlockEntityTypeEntry

Registers a native BlockEntityType with hot-reload support.

Parameters

ParameterDescription
idBlockEntityType identifier (e.g., "mymod:custom_block_entity")
registerModeRegistration mode (GLOBAL, WORLD, or RELOADABLE)
blockEntityTypeFactoryFactory function to create the BlockEntityType instance

Returns

The registered KattonBlockEntityTypeEntry

registerNativeBlockEntityType

registerNativeBlockEntityTypeCommonFunction
kotlin
fun registerNativeBlockEntityType(id: Identifier, registerMode: RegisterMode = RegisterMode.WORLD, blockEntityTypeFactory: () -> BlockEntityType<*>): KattonRegistry.KattonBlockEntityTypeEntry

Registers a native BlockEntityType with hot-reload support.

Parameters

ParameterDescription
idBlockEntityType identifier
registerModeRegistration mode
blockEntityTypeFactoryFactory function to create the BlockEntityType instance

Returns

The registered KattonBlockEntityTypeEntry