Interface FreezeRegistryEvent.Post

All Superinterfaces:
Event, FreezeRegistryEvent, LifecycleEvent
All Known Subinterfaces:
FreezeRegistryEvent.Post.EngineScoped<E>, FreezeRegistryEvent.Post.GameScoped, FreezeRegistryEvent.Post.WorldScoped
Enclosing interface:
FreezeRegistryEvent

public static interface FreezeRegistryEvent.Post extends FreezeRegistryEvent
Fired after a layer has established its registries and is no longer accepting any type of modifications.

Note: Layers might be reloadable! When a registry is being reloaded, this event is fired again for the relevant registries.

  • Method Details

    • holder

      RegistryHolder holder()
      Gets the built registry holder.
      Returns:
      The registry holder.
    • registry

      default <T> void registry(RegistryType<T> registryType, Consumer<Registry<T>> consumer)

      Fetch a registry by its type.

      The consumer will be called if it matches the current set of registries being created.

      Parameters:
      registryType - The registry type to fetch.
      consumer - The consumer to be called if found.