Interface AddCallback<T>

All Superinterfaces:
RegistryCallback<T>
All Known Implementing Classes:
NeoForgeRegistryCallbacks.BlockCallbacks, NeoForgeRegistryCallbacks.ItemCallbacks, NeoForgeRegistryCallbacks.PoiTypeCallbacks
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public non-sealed interface AddCallback<T> extends RegistryCallback<T>
Fired when objects are added to the registry. This will fire when the registry is rebuilt on the client side from a server side synchronization.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onAdd(Registry<T> registry, int id, ResourceKey<T> key, T value)
    Called when an entry is added to the registry.
  • Method Details

    • onAdd

      void onAdd(Registry<T> registry, int id, ResourceKey<T> key, T value)
      Called when an entry is added to the registry.
      Parameters:
      registry - the registry
      id - the integer ID assigned to the entry
      key - the resource key for the entry
      value - the entry's value