Class FMLModIdMappingEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.fml.event.lifecycle.ModLifecycleEvent
-
- net.minecraftforge.fml.event.lifecycle.FMLModIdMappingEvent
-
- All Implemented Interfaces:
IModBusEvent
public class FMLModIdMappingEvent extends ModLifecycleEvent
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 theMinecraftForge.EVENT_BUS
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FMLModIdMappingEvent.ModRemapping
-
Field Summary
Fields Modifier and Type Field Description boolean
isFrozen
private com.google.common.collect.ImmutableSet<ResourceLocation>
keys
private java.util.Map<ResourceLocation,com.google.common.collect.ImmutableList<FMLModIdMappingEvent.ModRemapping>>
remaps
-
Constructor Summary
Constructors Constructor Description FMLModIdMappingEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps, boolean isFrozen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableSet<ResourceLocation>
getRegistries()
com.google.common.collect.ImmutableList<FMLModIdMappingEvent.ModRemapping>
getRemaps(ResourceLocation registry)
-
Methods inherited from class net.minecraftforge.fml.event.lifecycle.ModLifecycleEvent
description, getContainer, getIMCStream, getIMCStream, toString
-
-
-
-
Field Detail
-
remaps
private final java.util.Map<ResourceLocation,com.google.common.collect.ImmutableList<FMLModIdMappingEvent.ModRemapping>> remaps
-
keys
private final com.google.common.collect.ImmutableSet<ResourceLocation> keys
-
isFrozen
public final boolean isFrozen
-
-
Constructor Detail
-
FMLModIdMappingEvent
public FMLModIdMappingEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps, boolean isFrozen)
-
-
Method Detail
-
getRegistries
public com.google.common.collect.ImmutableSet<ResourceLocation> getRegistries()
-
getRemaps
public com.google.common.collect.ImmutableList<FMLModIdMappingEvent.ModRemapping> getRemaps(ResourceLocation registry)
-
-