类 DeferredRegister.DataComponents
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<DataComponentType<?>>
net.neoforged.neoforge.registries.DeferredRegister.DataComponents
- 封闭类:
DeferredRegister<T>
Specialized DeferredRegister for
DataComponentTypes
.-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.registries.DeferredRegister
DeferredRegister.Blocks, DeferredRegister.DataComponents, DeferredRegister.Entities, DeferredRegister.Items
-
构造器概要
构造器限定符构造器说明protected
DataComponents
(ResourceKey<Registry<DataComponentType<?>>> registryKey, String namespace) -
方法概要
修饰符和类型方法说明<D> DeferredHolder
<DataComponentType<?>, DataComponentType<D>> registerComponentType
(String name, UnaryOperator<DataComponentType.Builder<D>> builder) Convenience method that constructs a builder for use in the operator.从类继承的方法 net.neoforged.neoforge.registries.DeferredRegister
addAlias, create, create, create, createBlocks, createDataComponents, createEntities, createHolder, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register, register, register
-
构造器详细资料
-
DataComponents
-
-
方法详细资料
-
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.- 参数:
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.- 返回:
- A
DeferredHolder
which reflects the data that will be registered.
-