Interface RegistrationProvider.Factory

Enclosing interface:
RegistrationProvider<T>

public static interface RegistrationProvider.Factory
Factory class for registration providers.
This class is loaded using Service Loaders, and only one should exist per mod loader.
  • Method Details

    • create

      <T> RegistrationProvider<T> create(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> resourceKey, String modId)
      Type Parameters:
      T - the type of the provider
      Parameters:
      resourceKey - the ResourceKey of the registry to create this provider for
      modId - the mod id for which the provider will register objects
      Returns:
      the provider
    • create

      default <T> RegistrationProvider<T> create(net.minecraft.core.Registry<T> registry, String modId)
      Type Parameters:
      T - the type of the provider
      Parameters:
      registry - the Registry to create this provider for
      modId - the mod id for which the provider will register objects
      Returns:
      the provider