onRegisteredClient

abstract fun onRegisteredClient(configId: Identifier, listener: OnRegisteredClientListener)

Registers a listener to the onRegisteredClient event.

  • If the config has already been registered when this is called the listener will be fired right away

  • Otherwise, the listener will be queued and fired after the config is registered

Typically, this will happen sometime during mod initialization, but that isn't guaranteed. Fzzy Configs can be loaded lazily. If the config is never loaded, or not loaded on the client, this listener will never be fired.

This should only perform client logic, and anything referencing client-only classes needs to go here.

Author

fzzyhmstrs

Since

0.5.0

Parameters

configId

Identifier the registry id of the config to listen for

listener

OnRegisteredClientListener callback that is fired when any config is registered on the client side. This can be used to act on registration of other configs, not just your own.