Interface DynamicRegistrySetupCallback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DynamicRegistrySetupCallback
This event gets triggered before a dynamic registry is being loaded. 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:
 
 DynamicRegistrySetupCallback.EVENT.register(registryView -> {
     registryView.registerEntryAdded(RegistryKeys.BIOME, (rawId, id, object) -> {
         // Do something
     });
 });
 
 
See Also: