Class IdMappingEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.registries.IdMappingEvent
@Deprecated(forRemoval=true,
since="1.20.2")
public class IdMappingEvent
extends net.neoforged.bus.api.Event
Deprecated, for removal: This API element is subject to removal in a future version.
Called whenever the ID mapping might have changed. If you register for this event, you
will be called back whenever the client or server loads an ID set. This includes both
when the ID maps are loaded from disk, as well as when the ID maps revert to the initial
state.
Note: you cannot change the IDs that have been allocated, but you might want to use this event to update caches or other in-mod artifacts that might be impacted by an ID change.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDeprecated, for removal: This API element is subject to removal in a future version.static classDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanDeprecated, for removal: This API element is subject to removal in a future version.private final ImmutableSet<ResourceLocation> Deprecated, for removal: This API element is subject to removal in a future version.private final Map<ResourceLocation, ImmutableList<IdMappingEvent.ModRemapping>> Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionIdMappingEvent(Map<ResourceLocation, Map<ResourceLocation, IdMappingEvent.IdRemapping>> remaps, boolean isFrozen) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.getRemaps(ResourceLocation registry) Deprecated, for removal: This API element is subject to removal in a future version.booleanisFrozen()Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
remaps
Deprecated, for removal: This API element is subject to removal in a future version. -
keys
Deprecated, for removal: This API element is subject to removal in a future version. -
isFrozen
private final boolean isFrozenDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
IdMappingEvent
public IdMappingEvent(Map<ResourceLocation, Map<ResourceLocation, IdMappingEvent.IdRemapping>> remaps, boolean isFrozen) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getRegistries
Deprecated, for removal: This API element is subject to removal in a future version. -
getRemaps
Deprecated, for removal: This API element is subject to removal in a future version. -
isFrozen
public boolean isFrozen()Deprecated, for removal: This API element is subject to removal in a future version.
-
DeferredRegister.addAlias(ResourceLocation, ResourceLocation)orIRegistryExtension.addAlias(ResourceLocation, ResourceLocation)instead