Interface WritableRegistry<T,B extends RegistryBuilder<T>>

Type Parameters:
T - registry entry type
B - registry entry builder type

@Experimental @NullMarked @NonExtendable public interface WritableRegistry<T,B extends RegistryBuilder<T>>
A registry which supports registering new objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(TypedKey<T> key, Consumer<? super B> value)
    Register a new value with the specified key.
  • Method Details

    • register

      void register(TypedKey<T> key, Consumer<? super B> value)
      Register a new value with the specified key. This will fire a RegistryEntryAddEvent for the new entry.
      Parameters:
      key - the entry's key (must be unique from others)
      value - a consumer for the entry's builder