DynamicRegistrySetupCallback

public interface DynamicRegistrySetupCallback

This event gets triggered when a new DynamicRegistryManager gets created, but before it gets filled. Therefore, this is the ideal place to register callbacks to dynamic registries. For example, the following code is used to register a callback that gets triggered for any registered Biome, both JSON and code defined.

{@code * DynamicRegistrySetupCallback.EVENT.register(registryManager -> { * Registrybiomes = registryManager.get(Registry.BIOME_KEY);
 *     RegistryEntryAddedCallback.event(biomes).register((rawId, id, object) -> {
 *         // Do something
 *     });
 * });
 * }
 

Functions

onRegistrySetup
Link copied to clipboard
abstract void onRegistrySetup(DynamicRegistryManager registryManager)

Sources

jvm source
Link copied to clipboard