Interface IPlatformItemHelper

All Known Implementing Classes:
NeoForgeItemHelper

public interface IPlatformItemHelper
Platform abstraction for item registration in Obsidian Weave mods. Implemented by platform-specific helpers for Fabric and Forge.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initializes the item helper for the given mod ID.
    <T extends net.minecraft.world.item.Item>
    Supplier<T>
    registerItem(String name, Supplier<T> itemSupplier)
    Registers an item with the given name and supplier.
  • Method Details

    • initialize

      void initialize(String modId)
      Initializes the item helper for the given mod ID.
      Parameters:
      modId - The mod ID to register items for.
    • registerItem

      <T extends net.minecraft.world.item.Item> Supplier<T> registerItem(String name, Supplier<T> itemSupplier)
      Registers an item with the given name and supplier.
      Type Parameters:
      T - The item type.
      Parameters:
      name - The item name.
      itemSupplier - The item supplier.
      Returns:
      A supplier for the registered item.