RegistryIdRemapCallback

public interface RegistryIdRemapCallback<T>

The remapping process functions as follows:

  • RegistryEntryRemovedCallbacks are called to remove any objects culled in the process, with the old numeric ID.
  • RegistryIdRemapCallback is emitted to allow remapping the IDs of objects still present.
  • RegistryEntryAddedCallbacks are called to add any objects added in the process, with the new numeric ID.

RegistryIdRemapCallback is called on every remapping operation, if you want to do your own processing in one swoop (say, rebuild the ID map from scratch).

Generally speaking, a remap can only cause object *removals*; object *additions* are necessary to reverse remaps.

Parameters

<T>

The registry type.

Types

RemapState
Link copied to clipboard
public interface RemapState<T>

Functions

event
Link copied to clipboard
static Event<RegistryIdRemapCallback<T>> event<T>(Registry<T> registry)
onRemap
Link copied to clipboard
abstract void onRemap(RegistryIdRemapCallback.RemapState<T> state)

Inheritors

IdListTracker
Link copied to clipboard
Int2ObjectMapTracker
Link copied to clipboard
StateIdTracker
Link copied to clipboard

Sources

jvm source
Link copied to clipboard