Skip to content
On this page
Common

ParticleType

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

registerNativeParticleType

registerNativeParticleTypeCommonFunction
kotlin
fun registerNativeParticleType(id: String, registerMode: RegisterMode = RegisterMode.WORLD, particleTypeFactory: () -> ParticleType<*>): KattonRegistry.KattonParticleTypeEntry

Registers a native ParticleType with hot-reload support.

Parameters

ParameterDescription
idParticle identifier (e.g., "mymod:custom_particle")
registerModeRegistration mode (GLOBAL, WORLD, or RELOADABLE)
particleTypeFactoryFactory function to create the ParticleType instance

Returns

The registered KattonParticleTypeEntry

registerNativeParticleType

registerNativeParticleTypeCommonFunction
kotlin
fun registerNativeParticleType(id: Identifier, registerMode: RegisterMode = RegisterMode.WORLD, particleTypeFactory: () -> ParticleType<*>): KattonRegistry.KattonParticleTypeEntry

Registers a native ParticleType with hot-reload support.

Parameters

ParameterDescription
idParticle identifier
registerModeRegistration mode
particleTypeFactoryFactory function to create the ParticleType instance

Returns

The registered KattonParticleTypeEntry