kotlin
@ApiStatus.Experimental
@ApiStatus.Experimental fun registerNativeBlock(id: String, registerMode: RegisterMode = RegisterMode.AUTO, blockFactory: (BlockBehaviour.Properties) -> Block): KattonRegistry.KattonBlockEntryRegisters a native Block with hot-reload support (String overload).
This is the primary API for registering custom Block subclasses from scripts. The block will be registered in the global Minecraft registry with full hot-reload capability.
Parameters
| Parameter | Description |
|---|---|
id | Block identifier (e.g., "mymod:custom_block") |
registerMode | Registration mode (GLOBAL, RELOADABLE, or AUTO) |
blockFactory | Factory function to create the Block instance, receives Properties |
Returns
The registered KattonBlockEntry