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

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

@Experimental @NonExtendable public interface RegistryComposeEvent<T,B extends RegistryBuilder<T>> extends RegistryEvent<T>
Event object for RegistryEventProvider.compose(). This event is fired after a registry is loaded with its normal values. 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