Class DeferredItems
java.lang.Object
net.neoforged.neoforge.registries.DeferredRegister<Item>
net.neoforged.neoforge.registries.DeferredRegister.Items
net.neoforged.testframework.registration.DeferredItems
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.registries.DeferredRegisterDeferredRegister.Blocks, DeferredRegister.Items
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected <I extends Item>
 DeferredItemBuilder<I>createHolder(ResourceKey<? extends Registry<Item>> registryKey, ResourceLocation key) Create aDeferredHolderor 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 aDeferredItemthat 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 aDeferredItemthat 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 aDeferredItemthat 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 aDeferredItemthat will be populated with the created item automatically.registerSimpleBlockItem(String name, Supplier<? extends Block> block) Adds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.registerSimpleBlockItem(String name, Supplier<? extends Block> block, Item.Properties properties) Adds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.registerSimpleBlockItem(Holder<Block> block) Adds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.registerSimpleBlockItem(Holder<Block> block, Item.Properties properties) Adds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.registerSimpleItem(String name) Adds a new simpleItemwith the defaultpropertiesto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.registerSimpleItem(String name, Item.Properties props) Adds a new simpleItemwith the givenpropertiesto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.Methods inherited from class net.neoforged.neoforge.registries.DeferredRegisteraddAlias, create, create, create, createBlocks, createItems, createTagKey, createTagKey, getEntries, getNamespace, getRegistry, getRegistryKey, getRegistryName, makeRegistry, register
- 
Field Details- 
registrationHelper
 
- 
- 
Constructor Details- 
DeferredItems
 
- 
- 
Method Details- 
createHolderprotected <I extends Item> DeferredItemBuilder<I> createHolder(ResourceKey<? extends Registry<Item>> registryKey, ResourceLocation key) Description copied from class:DeferredRegisterCreate aDeferredHolderor an inheriting type to be stored.- Overrides:
- createHolderin class- DeferredRegister.Items
- Type Parameters:
- I- The specific type of the entry.
- Parameters:
- registryKey- The key of the registry.
- key- The resource location of the entry.
- Returns:
- The new instance of DeferredHolderor an inheriting type.
 
- 
registerpublic <I extends Item> DeferredItemBuilder<I> register(String name, Function<ResourceLocation, ? extends I> func) Description copied from class:DeferredRegister.ItemsAdds a new item to the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerin class- DeferredRegister.Items
- Parameters:
- 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.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerDescription copied from class:DeferredRegister.ItemsAdds a new item to the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerin class- DeferredRegister.Items
- Parameters:
- 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.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleBlockItempublic DeferredItemBuilder<BlockItem> registerSimpleBlockItem(String name, Supplier<? extends Block> block, Item.Properties properties) Description copied from class:DeferredRegister.ItemsAdds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerSimpleBlockItemin class- DeferredRegister.Items
- Parameters:
- name- The new item's name. It will automatically have the namespace prefixed.
- block- The supplier for the block to create a- BlockItemfor.
- properties- The properties for the created- BlockItem.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleBlockItempublic DeferredItemBuilder<BlockItem> registerSimpleBlockItem(String name, Supplier<? extends Block> block) Description copied from class:DeferredRegister.ItemsAdds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically. This method uses the defaultItem.Properties.- Overrides:
- registerSimpleBlockItemin class- DeferredRegister.Items
- Parameters:
- name- The new item's name. It will automatically have the namespace prefixed.
- block- The supplier for the block to create a- BlockItemfor.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleBlockItempublic DeferredItemBuilder<BlockItem> registerSimpleBlockItem(Holder<Block> block, Item.Properties properties) Description copied from class:DeferredRegister.ItemsAdds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically. Where the name is determined by the name of the given block.- Overrides:
- registerSimpleBlockItemin class- DeferredRegister.Items
- Parameters:
- block- The- DeferredHolderof the- Blockfor the- BlockItem.
- properties- The properties for the created- BlockItem.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleBlockItemDescription copied from class:DeferredRegister.ItemsAdds a new simpleBlockItemfor the givenBlockto the list of entries to be registered and returns aDeferredItemthat 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.- Overrides:
- registerSimpleBlockItemin class- DeferredRegister.Items
- Parameters:
- block- The- DeferredHolderof the- Blockfor the- BlockItem.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerItempublic <I extends Item> DeferredItemBuilder<I> registerItem(String name, Function<Item.Properties, ? extends I> func, Item.Properties props) Description copied from class:DeferredRegister.ItemsAdds a new item to the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerItemin class- DeferredRegister.Items
- Parameters:
- 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.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerItempublic <I extends Item> DeferredItemBuilder<I> registerItem(String name, Function<Item.Properties, ? extends I> func) Description copied from class:DeferredRegister.ItemsAdds a new item to the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically. This method uses the defaultItem.Properties.- Overrides:
- registerItemin class- DeferredRegister.Items
- Parameters:
- 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.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleItemDescription copied from class:DeferredRegister.ItemsAdds a new simpleItemwith the givenpropertiesto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerSimpleItemin class- DeferredRegister.Items
- Parameters:
- 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.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
- 
registerSimpleItemDescription copied from class:DeferredRegister.ItemsAdds a new simpleItemwith the defaultpropertiesto the list of entries to be registered and returns aDeferredItemthat will be populated with the created item automatically.- Overrides:
- registerSimpleItemin class- DeferredRegister.Items
- Parameters:
- name- The new item's name. It will automatically have the namespace prefixed.
- Returns:
- A DeferredItemthat will track updates from the registry for this item.
- See Also:
 
 
-