Class StateIdTracker<T,S>
java.lang.Object
net.fabricmc.fabric.impl.registry.sync.trackers.StateIdTracker<T,S>
- All Implemented Interfaces:
RegistryEntryAddedCallback<T>, RegistryIdRemapCallback<T>
public final class StateIdTracker<T,S>
extends Object
implements RegistryIdRemapCallback<T>, RegistryEntryAddedCallback<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface RegistryIdRemapCallback
RegistryIdRemapCallback.RemapState<T> -
Method Summary
Modifier and TypeMethodDescriptionvoidonEntryAdded(int rawId, net.minecraft.resources.Identifier id, T object) Called when a new entry is added to the registry.voidstatic <T,S> void register(net.minecraft.core.Registry<T> registry, net.minecraft.core.IdMapper<S> stateList, Function<T, Collection<S>> stateGetter)
-
Method Details
-
register
public static <T,S> void register(net.minecraft.core.Registry<T> registry, net.minecraft.core.IdMapper<S> stateList, Function<T, Collection<S>> stateGetter) -
onEntryAdded
Description copied from interface:RegistryEntryAddedCallbackCalled when a new entry is added to the registry.- Specified by:
onEntryAddedin interfaceRegistryEntryAddedCallback<T>- Parameters:
rawId- the raw id of the entryid- the identifier of the entryobject- the object that was added
-
onRemap
- Specified by:
onRemapin interfaceRegistryIdRemapCallback<T>
-