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>

public static class NeoForgeRegister.Items extends Register.Items
  • Constructor Details

    • Items

      public Items(String namespace)
  • Method Details

    • register

      public <I extends net.minecraft.world.item.Item> RegistryItem<I> register(String name, Supplier<I> supplier)
      Description copied from class: Register.Items
      Registers a new item.
      Overrides:
      register in class Register.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: Register
      Performs 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.

      Overrides:
      register in class Register<net.minecraft.world.item.Item>