Interface ClearCallback<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 ClearCallback<T> extends RegistryCallback<T>
Fired when the registry is cleared. This is done before a registry is reloaded from client or server.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClear(Registry<T> registry, boolean full)
    Called when the registry is cleared before anything is done to the registry.
  • Method Details

    • onClear

      void onClear(Registry<T> registry, boolean full)
      Called when the registry is cleared before anything is done to the registry.
      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.