use of net.minecraftforge.event.RegistryEvent.MissingMappings in project ImmersiveEngineering by BluSunrize.
the class NameRemapper method remap.
public static void remap(MissingMappings<?> ev) {
for (MissingMappings.Mapping miss : ev.getMappings()) {
String newName = nameMap.get(miss.key.getPath());
if (newName != null) {
ResourceLocation newLoc = new ResourceLocation(ImmersiveEngineering.MODID, newName);
IForgeRegistryEntry newTarget = miss.registry.getValue(newLoc);
if (newTarget != null) {
IELogger.info("Successfully remapped RegistryEntry " + miss.key);
miss.remap(newTarget);
} else
miss.warn();
} else {
IELogger.error("Couldn't remap " + miss.key);
}
}
}
Aggregations