Package net.minecraftforge.event
Class RegistryEvent.IdMappingEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.RegistryEvent.IdMappingEvent
- Enclosing class:
- RegistryEvent<T extends IForgeRegistryEntry<T>>
public static class RegistryEvent.IdMappingEvent
extends net.minecraftforge.eventbus.api.Event
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.
Fired on the
MinecraftForge.EVENT_BUS
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionfinal boolean
private final com.google.common.collect.ImmutableSet<ResourceLocation>
private final Map<ResourceLocation,
com.google.common.collect.ImmutableList<RegistryEvent.IdMappingEvent.ModRemapping>> -
Constructor Summary
ConstructorDescriptionIdMappingEvent
(Map<ResourceLocation, Map<ResourceLocation, Integer[]>> remaps, boolean isFrozen) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<ResourceLocation>
com.google.common.collect.ImmutableList<RegistryEvent.IdMappingEvent.ModRemapping>
getRemaps
(ResourceLocation registry) Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
remaps
private final Map<ResourceLocation,com.google.common.collect.ImmutableList<RegistryEvent.IdMappingEvent.ModRemapping>> remaps -
keys
-
isFrozen
public final boolean isFrozen
-
-
Constructor Details
-
IdMappingEvent
public IdMappingEvent(Map<ResourceLocation, Map<ResourceLocation, Integer[]>> remaps, boolean isFrozen)
-
-
Method Details
-
getRegistries
-
getRemaps
public com.google.common.collect.ImmutableList<RegistryEvent.IdMappingEvent.ModRemapping> getRemaps(ResourceLocation registry)
-