Interface ItemRegistrar

All Known Implementing Classes:
ForgeItemRegistrar

@Internal public interface ItemRegistrar
Internal API for registering items with the mod registry system.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends net.minecraft.world.item.Item>
    Supplier<T>
    registerItem(String registryName, Supplier<T> supplier)
    Registers an item with the mod registry.
  • Method Details

    • registerItem

      <T extends net.minecraft.world.item.Item> Supplier<T> registerItem(String registryName, Supplier<T> supplier)
      Registers an item with the mod registry.
      Type Parameters:
      T - Type of item being registered
      Parameters:
      registryName - Unique registry name for the item (id)
      supplier - Factory for creating the instance
      Returns:
      Registered item supplier that can resolve the instance