kotlin
fun registerNativeEffect(id: String, registerMode: RegisterMode = RegisterMode.AUTO, effectFactory: () -> MobEffect): KattonRegistry.KattonMobEffectEntryRegisters a native MobEffect with hot-reload support (String overload).
This is the primary API for registering custom MobEffect subclasses from scripts. The effect will be registered in the global Minecraft registry with full hot-reload capability.
Parameters
| Parameter | Description |
|---|---|
id | Effect identifier (e.g., "mymod:custom_effect") |
registerMode | Registration mode (GLOBAL, RELOADABLE, or AUTO) |
effectFactory | Factory function to create the MobEffect instance |
Returns
The registered KattonMobEffectEntry