internal static void Load()
{
Interface.loadMods.SetLoadStage("tModLoader.MSIntializing", ModLoader.Mods.Length);
LoadModContent(mod => {
mod.loading = true;
mod.File?.Read(TmodFile.LoadedState.Streaming, mod.LoadResourceFromStream);
mod.Autoload();
mod.Load();
mod.loading = false;
});
Interface.loadMods.SetLoadStage("tModLoader.MSSettingUp");
ResizeArrays();
RecipeGroupHelper.FixRecipeGroupLookups();
Interface.loadMods.SetLoadStage("tModLoader.MSLoading", ModLoader.Mods.Length);
LoadModContent(mod => {
mod.SetupContent();
mod.PostSetupContent();
mod.File?.UnloadAssets();
});
if (Main.dedServ)
{
ModNet.AssignNetIDs();
}
Main.player[255] = new Player(false); // setup inventory is unnecessary
RefreshModLanguage(Language.ActiveCulture);
MapLoader.SetupModMap();
ItemSorting.SetupWhiteLists();
PlayerInput.ReInitialize();
SetupRecipes();
}