Interface RegistryEvents.DynamicRegistrySetupCallback

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.DynamicRegistrySetupCallback extends CommonEventEntrypoint
  • Method Details

    • onDynamicRegistrySetup

      void onDynamicRegistrySetup(@NotNull @NotNull DynamicRegistryManagerSetupContext context)
      Called when a new RegistryAccess gets created, but before it gets filled.

      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:
      context - the dynamic registry manager setup context