Interface RegistryEvents.DynamicRegistryLoadedCallback
- All Superinterfaces:
CommonEventEntrypoint
- Enclosing class:
- RegistryEvents
- 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 static interface RegistryEvents.DynamicRegistryLoadedCallback
extends CommonEventEntrypoint
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDynamicRegistryLoaded(@NotNull net.minecraft.core.RegistryAccess registryManager) Called when a newRegistryAccessgets created, after it has been filled with the registry entries specified by data packs.
-
Method Details
-
onDynamicRegistryLoaded
void onDynamicRegistryLoaded(@NotNull @NotNull net.minecraft.core.RegistryAccess registryManager) Called when a newRegistryAccessgets created, after it has been filled with the registry entries specified by data packs.Important Note: The passed dynamic registry manager might not contain the registry, as this event is invoked for each layer of the combined registry manager, and each layer holds different registries. Use
RegistryAccess.registry(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends E>>)to prevent crashes.- Parameters:
registryManager- the registry manager
-