Class DeferredRegister.DataComponents

java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<DataComponentType<?>>
net.neoforged.neoforge.registries.DeferredRegister.DataComponents
Enclosing class:
DeferredRegister<T>

public static class DeferredRegister.DataComponents extends DeferredRegister<DataComponentType<?>>
Specialized DeferredRegister for DataComponentTypes.
  • Constructor Details

    • DataComponents

      protected DataComponents(String namespace)
  • Method Details

    • registerComponentType

      public <D> DeferredHolder<DataComponentType<?>,DataComponentType<D>> registerComponentType(String name, UnaryOperator<DataComponentType.Builder<D>> builder)
      Convenience method that constructs a builder for use in the operator. Use this to avoid inference issues.
      Parameters:
      name - The name for this data component type. It will automatically have the namespace prefixed.
      builder - The unary operator, which is passed a new builder for user operations, then builds it upon registration.
      Returns:
      A DeferredHolder which reflects the data that will be registered.