Rather than try to fall back to the backup level.dat in case of weirdness
in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse.
This commit is contained in:
parent
ddcc6a1aa4
commit
0bff21315c
|
@ -272,7 +272,21 @@ public class FMLContainer extends DummyModContainer implements WorldAccessContai
|
|||
itemSubstitutions.add(dataTag.getString("K"));
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
failedElements = GameData.injectWorldIDMap(dataList, blockedIds, blockAliases, itemAliases, blockSubstitutions, itemSubstitutions, true, true);
|
||||
} catch (IllegalArgumentException ex)
|
||||
{
|
||||
// In the case of IllegalArgumentException the state map is utterly toast. We should immediately abort
|
||||
String msg = "The world state is utterly corrupted and this save is NOT loadable\n\n"
|
||||
+ "There is a high probability that a mod has broken the\n"
|
||||
+ "ID map and there is\n"
|
||||
+ "NOTHING FML or Forge can do to recover this save.\n\n"
|
||||
+ "If you changed your mods, try reverting the change";
|
||||
FMLLog.log(Level.FATAL, ex, msg);
|
||||
StartupQuery.notify(msg);
|
||||
StartupQuery.abort();
|
||||
}
|
||||
}
|
||||
|
||||
if (failedElements != null && !failedElements.isEmpty())
|
||||
|
|
Loading…
Reference in New Issue