接口 AddCallback<T>

所有超级接口:
RegistryCallback<T>
所有已知实现类:
NeoForgeRegistryCallbacks.BlockCallbacks, NeoForgeRegistryCallbacks.ItemCallbacks, NeoForgeRegistryCallbacks.PoiTypeCallbacks
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@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.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    onAdd(Registry<T> registry, int id, ResourceKey<T> key, T value)
    Called when an entry is added to the registry.
  • 方法详细资料

    • onAdd

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