Class NeoForgeRegistryCallbacks.ItemCallbacks

java.lang.Object
net.neoforged.neoforge.registries.NeoForgeRegistryCallbacks.ItemCallbacks
All Implemented Interfaces:
AddCallback<Item>, ClearCallback<Item>, RegistryCallback<Item>
Enclosing class:
NeoForgeRegistryCallbacks

static class NeoForgeRegistryCallbacks.ItemCallbacks extends Object implements AddCallback<Item>, ClearCallback<Item>
  • Field Details

  • Constructor Details

    • ItemCallbacks

      ItemCallbacks()
  • Method Details

    • onAdd

      public void onAdd(Registry<Item> registry, int id, ResourceKey<Item> key, Item item)
      Description copied from interface: AddCallback
      Called when an entry is added to the registry.
      Specified by:
      onAdd in interface AddCallback<Item>
      Parameters:
      registry - the registry
      id - the integer ID assigned to the entry
      key - the resource key for the entry
      item - the entry's value
    • onClear

      public void onClear(Registry<Item> registry, boolean full)
      Description copied from interface: ClearCallback
      Called when the registry is cleared before anything is done to the registry.
      Specified by:
      onClear in interface ClearCallback<Item>
      Parameters:
      registry - the registry
      full - if true, all entries in the registry will be cleared. if false, only integer IDs in the registry will be cleared.