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

Type Parameters:
T - registry entry type
B - registry entry builder type
All Superinterfaces:
LifecycleEvent, RegistryEvent<T>

@Experimental @NullMarked @NonExtendable public interface RegistryFreezeEvent<T,B extends RegistryBuilder<T>> extends RegistryEvent<T>
Event object for RegistryEventProvider.freeze(). This event is fired right before a registry is frozen disallowing further changes. It provides a way for plugins to add new objects to the registry.
  • Method Details

    • registry

      WritableRegistry<T,B> registry()
      Get the writable registry.
      Returns:
      a writable registry
    • getOrCreateTag

      <V extends Keyed> Tag<V> getOrCreateTag(TagKey<V> tagKey)
      Gets or creates a tag for the given tag key. This tag is then required to be filled either from the built-in or custom datapack.
      Type Parameters:
      V - the tag value type
      Parameters:
      tagKey - the tag key
      Returns:
      the tag