Class NeoForgeRegister.Items
java.lang.Object
net.xun.lib.common.api.registries.Register<net.minecraft.world.item.Item>
net.xun.lib.common.api.registries.Register.Items
net.xun.lib.neoforge.api.registries.NeoForgeRegister.Items
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.Item>
- Enclosing class:
NeoForgeRegister<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.xun.lib.common.api.registries.Register
Register.Blocks, Register.Items -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregister()Performs final registration by binding all holders to the actual registry.<I extends net.minecraft.world.item.Item>
RegistryItem<I> Registers a new item.Methods inherited from class net.xun.lib.common.api.registries.Register.Items
bind, createHolderMethods inherited from class net.xun.lib.common.api.registries.Register
create, create, createBlocks, createItems, getEntries, getNamespace, getRegistryKey, iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Items
-
-
Method Details
-
register
public <I extends net.minecraft.world.item.Item> RegistryItem<I> register(String name, Supplier<I> supplier) Description copied from class:Register.ItemsRegisters a new item.- Overrides:
registerin classRegister.Items- Type Parameters:
I- The concrete item type- Parameters:
name- The name of the item (without namespace)supplier- Supplier providing the item instance- Returns:
- A specialized item registry holder
-
register
public void register()Description copied from class:RegisterPerforms final registration by binding all holders to the actual registry.This should be called during mod initialization after the registry is available. Note: Certain registry types are bound immediately and skip this step.
-