Class NeoForgeRegistryCallbacks.ItemCallbacks

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

static class NeoForgeRegistryCallbacks.ItemCallbacks extends Object implements AddCallback<net.minecraft.world.item.Item>, ClearCallback<net.minecraft.world.item.Item>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final Map<net.minecraft.world.level.block.Block,net.minecraft.world.item.Item>
     
    (package private) static final NeoForgeRegistryCallbacks.ItemCallbacks
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onAdd(net.minecraft.core.Registry<net.minecraft.world.item.Item> registry, int id, net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> key, net.minecraft.world.item.Item item)
    Called when an entry is added to the registry.
    void
    onClear(net.minecraft.core.Registry<net.minecraft.world.item.Item> registry, boolean full)
    Called when the registry is cleared before anything is done to the registry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ItemCallbacks

      ItemCallbacks()
  • Method Details

    • onAdd

      public void onAdd(net.minecraft.core.Registry<net.minecraft.world.item.Item> registry, int id, net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> key, net.minecraft.world.item.Item item)
      Description copied from interface: AddCallback
      Called when an entry is added to the registry.
      Specified by:
      onAdd in interface AddCallback<net.minecraft.world.item.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(net.minecraft.core.Registry<net.minecraft.world.item.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<net.minecraft.world.item.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.