Interface Registrar<T>

Type Parameters:
T - Type of the registrar
All Known Implementing Classes:
ForgeRegistrar

public interface Registrar<T>
Unstable API
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Registrar<T>
    create(net.minecraft.core.Registry<T> registry, String modId)
    Factory method to create a registrar for the given registry.
    <U extends T>
    LazyRegistryReference<U>
    register(String name, Supplier<U> supplier)
    Register an entry with lazy initialization
  • Method Details

    • create

      static <T> Registrar<T> create(net.minecraft.core.Registry<T> registry, String modId)
      Factory method to create a registrar for the given registry.
    • register

      <U extends T> LazyRegistryReference<U> register(String name, Supplier<U> supplier)
      Register an entry with lazy initialization