类 DeferredItems
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<Item>
net.neoforged.neoforge.registries.DeferredRegister.Items
net.neoforged.testframework.registration.DeferredItems
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.registries.DeferredRegister
DeferredRegister.Blocks, DeferredRegister.DataComponents, DeferredRegister.Entities, DeferredRegister.Items
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected <I extends Item>
DeferredItemBuilder<I> createHolder
(ResourceKey<? extends Registry<Item>> registryKey, ResourceLocation key) Create aDeferredHolder
or an inheriting type to be stored.<I extends Item>
DeferredItemBuilder<I> register
(String name, Function<ResourceLocation, ? extends I> func) Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.<I extends Item>
DeferredItemBuilder<I> Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.<I extends Item>
DeferredItemBuilder<I> registerItem
(String name, Function<Item.Properties, ? extends I> func) Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.<I extends Item>
DeferredItemBuilder<I> registerItem
(String name, Function<Item.Properties, ? extends I> func, Item.Properties props) Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleBlockItem
(String name, Supplier<? extends Block> block) Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleBlockItem
(String name, Supplier<? extends Block> block, Item.Properties properties) Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleBlockItem
(Holder<Block> block) Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleBlockItem
(Holder<Block> block, Item.Properties properties) Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleItem
(String name) Adds a new simpleItem
with the defaultproperties
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.registerSimpleItem
(String name, Item.Properties props) Adds a new simpleItem
with the givenproperties
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.从类继承的方法 net.neoforged.neoforge.registries.DeferredRegister
addAlias, create, create, create, createBlocks, createDataComponents, createEntities, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register
-
字段详细资料
-
registrationHelper
-
-
构造器详细资料
-
DeferredItems
-
-
方法详细资料
-
createHolder
protected <I extends Item> DeferredItemBuilder<I> createHolder(ResourceKey<? extends Registry<Item>> registryKey, ResourceLocation key) 从类复制的说明:DeferredRegister
Create aDeferredHolder
or an inheriting type to be stored.- 覆盖:
createHolder
在类中DeferredRegister.Items
- 类型参数:
I
- The specific type of the entry.- 参数:
registryKey
- The key of the registry.key
- The resource location of the entry.- 返回:
- The new instance of
DeferredHolder
or an inheriting type.
-
register
public <I extends Item> DeferredItemBuilder<I> register(String name, Function<ResourceLocation, ? extends I> func) 从类复制的说明:DeferredRegister.Items
Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
register
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.func
- A factory for the new item. The factory should not cache the created item.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
register
从类复制的说明:DeferredRegister.Items
Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
register
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.sup
- A factory for the new item. The factory should not cache the created item.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleBlockItem
public DeferredItemBuilder<BlockItem> registerSimpleBlockItem(String name, Supplier<? extends Block> block, Item.Properties properties) 从类复制的说明:DeferredRegister.Items
Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
registerSimpleBlockItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.block
- The supplier for the block to create aBlockItem
for.properties
- The properties for the createdBlockItem
.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleBlockItem
public DeferredItemBuilder<BlockItem> registerSimpleBlockItem(String name, Supplier<? extends Block> block) 从类复制的说明:DeferredRegister.Items
Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically. This method uses the defaultItem.Properties
.- 覆盖:
registerSimpleBlockItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.block
- The supplier for the block to create aBlockItem
for.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleBlockItem
public DeferredItemBuilder<BlockItem> registerSimpleBlockItem(Holder<Block> block, Item.Properties properties) 从类复制的说明:DeferredRegister.Items
Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically. Where the name is determined by the name of the given block.- 覆盖:
registerSimpleBlockItem
在类中DeferredRegister.Items
- 参数:
block
- TheDeferredHolder
of theBlock
for theBlockItem
.properties
- The properties for the createdBlockItem
.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleBlockItem
从类复制的说明:DeferredRegister.Items
Adds a new simpleBlockItem
for the givenBlock
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically. Where the name is determined by the name of the given block and uses the defaultItem.Properties
.- 覆盖:
registerSimpleBlockItem
在类中DeferredRegister.Items
- 参数:
block
- TheDeferredHolder
of theBlock
for theBlockItem
.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerItem
public <I extends Item> DeferredItemBuilder<I> registerItem(String name, Function<Item.Properties, ? extends I> func, Item.Properties props) 从类复制的说明:DeferredRegister.Items
Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
registerItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.func
- A factory for the new item. The factory should not cache the created item.props
- The properties for the created item.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerItem
public <I extends Item> DeferredItemBuilder<I> registerItem(String name, Function<Item.Properties, ? extends I> func) 从类复制的说明:DeferredRegister.Items
Adds a new item to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically. This method uses the defaultItem.Properties
.- 覆盖:
registerItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.func
- A factory for the new item. The factory should not cache the created item.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleItem
从类复制的说明:DeferredRegister.Items
Adds a new simpleItem
with the givenproperties
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
registerSimpleItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.props
- A factory for the new item. The factory should not cache the created item.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-
registerSimpleItem
从类复制的说明:DeferredRegister.Items
Adds a new simpleItem
with the defaultproperties
to the list of entries to be registered and returns aDeferredItem
that will be populated with the created item automatically.- 覆盖:
registerSimpleItem
在类中DeferredRegister.Items
- 参数:
name
- The new item's name. It will automatically have the namespace prefixed.- 返回:
- A
DeferredItem
that will track updates from the registry for this item. - 另请参阅:
-