diff --git a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 93cc41dac..64fd52fa6 100644 --- a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -60,10 +60,44 @@ this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y); this.field_110451_am.func_110542_a(this.field_147127_av); this.field_147126_aw = new MusicTicker(this); -@@ -532,19 +539,20 @@ +@@ -492,7 +499,10 @@ + this.field_110451_am.func_110542_a(this.field_71464_q); + this.field_110451_am.func_110542_a(new GrassColorReloadListener()); + this.field_110451_am.func_110542_a(new FoliageColorReloadListener()); ++ cpw.mods.fml.common.ProgressManager.ProgressBar bar= cpw.mods.fml.common.ProgressManager.push("Rendering Setup", 9); ++ bar.step("Loading Render Manager"); + RenderManager.field_78727_a.field_78721_f = new ItemRenderer(this); ++ bar.step("Loading Entity Renderer"); + this.field_71460_t = new EntityRenderer(this, this.field_110451_am); + this.field_110451_am.func_110542_a(this.field_71460_t); + AchievementList.field_76004_f.func_75988_a(new IStatStringFormat() +@@ -510,6 +520,7 @@ + } + } + }); ++ bar.step("Loading GL properties"); + this.field_71417_B = new MouseHelper(); + this.func_71361_d("Pre startup"); + GL11.glEnable(GL11.GL_TEXTURE_2D); +@@ -524,27 +535,35 @@ + GL11.glLoadIdentity(); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + this.func_71361_d("Startup"); ++ bar.step("Render Global instance"); + this.field_71438_f = new RenderGlobal(this); ++ bar.step("Building Blocks Texture"); + this.field_147128_au = new TextureMap(0, "textures/blocks"); ++ bar.step("Anisotropy and Mipmaps"); + this.field_147128_au.func_147632_b(this.field_71474_y.field_151443_J); + this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I); ++ bar.step("Loading Blocks Texture"); + this.field_71446_o.func_130088_a(TextureMap.field_110575_b, this.field_147128_au); ++ bar.step("Loading Items Texture"); this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items")); ++ bar.step("Viewport"); GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d); this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o); ++ cpw.mods.fml.common.ProgressManager.pop(bar); + FMLClientHandler.instance().finishMinecraftLoading(); this.func_71361_d("Post startup"); this.field_71456_v = new GuiIngame(this); @@ -83,7 +117,7 @@ this.field_152354_ay = null; this.field_71461_s = new LoadingScreenRenderer(this); -@@ -553,6 +561,7 @@ +@@ -553,6 +572,7 @@ this.func_71352_k(); } @@ -91,7 +125,7 @@ try { Display.setVSyncEnabled(this.field_71474_y.field_74352_v); -@@ -971,9 +980,11 @@ +@@ -970,9 +990,11 @@ if (!this.field_71454_w) { @@ -103,7 +137,7 @@ } GL11.glFlush(); -@@ -1555,6 +1566,8 @@ +@@ -1554,6 +1576,8 @@ --this.field_71467_ac; } @@ -112,7 +146,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) -@@ -1699,6 +1712,7 @@ +@@ -1698,6 +1722,7 @@ this.field_71462_r.func_146274_d(); } } @@ -120,7 +154,7 @@ } if (this.field_71429_W > 0) -@@ -1836,6 +1850,7 @@ +@@ -1835,6 +1860,7 @@ } } } @@ -128,7 +162,7 @@ } for (j = 0; j < 9; ++j) -@@ -2026,12 +2041,15 @@ +@@ -2025,12 +2051,15 @@ this.field_71453_ak.func_74428_b(); } @@ -144,7 +178,7 @@ this.func_71403_a((WorldClient)null); System.gc(); ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false); -@@ -2067,6 +2085,12 @@ +@@ -2066,6 +2095,12 @@ while (!this.field_71437_Z.func_71200_ad()) { @@ -157,7 +191,7 @@ String s2 = this.field_71437_Z.func_71195_b_(); if (s2 != null) -@@ -2142,6 +2166,7 @@ +@@ -2141,6 +2176,7 @@ this.field_110448_aq.func_148529_f(); this.func_71351_a((ServerData)null); this.field_71455_al = false; diff --git a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch index d83c6637c..1d48521be 100644 --- a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch @@ -1,37 +1,14 @@ --- ../src-base/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java +++ ../src-work/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java -@@ -6,16 +6,22 @@ - import com.google.common.collect.Lists; - import com.google.common.collect.Maps; - import com.google.common.collect.Sets; -+ -+import cpw.mods.fml.common.ProgressManager; -+import cpw.mods.fml.common.ProgressManager.ProgressBar; - import cpw.mods.fml.relauncher.Side; - import cpw.mods.fml.relauncher.SideOnly; -+ - import java.io.FileNotFoundException; - import java.io.IOException; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - import java.util.Set; -+ - import net.minecraft.client.resources.data.IMetadataSerializer; - import net.minecraft.util.ResourceLocation; -+ - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; - -@@ -95,6 +101,7 @@ +@@ -95,6 +95,7 @@ public void func_110541_a(List p_110541_1_) { this.func_110543_a(); -+ ProgressBar resReload = ProgressManager.push("Resource loading", p_110541_1_.size()); ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()); field_147967_a.info("Reloading ResourceManager: " + field_130074_a.join(Iterables.transform(p_110541_1_, new Function() { private static final String __OBFID = "CL_00001092"; -@@ -112,10 +119,12 @@ +@@ -112,16 +113,22 @@ while (iterator.hasNext()) { IResourcePack iresourcepack = (IResourcePack)iterator.next(); @@ -40,7 +17,17 @@ } this.func_110544_b(); -+ ProgressManager.pop(resReload); ++ cpw.mods.fml.common.ProgressManager.pop(resReload); } public void func_110542_a(IResourceManagerReloadListener p_110542_1_) + { + this.field_110546_b.add(p_110542_1_); ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resource", 1); ++ String rn = p_110542_1_.getClass().getName(); ++ resReload.step(rn.substring(rn.lastIndexOf('.')+1)); + p_110542_1_.func_110549_a(this); ++ cpw.mods.fml.common.ProgressManager.pop(resReload); + } + + private void func_110544_b() diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index 727e54270..ae3d2644c 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -341,7 +341,6 @@ public class FMLClientHandler implements IFMLSidedHandler } loading = false; client.gameSettings.loadOptions(); //Reload options to load any mod added keybindings. - SplashProgress.finish(); } @SuppressWarnings("unused") @@ -397,6 +396,8 @@ public class FMLClientHandler implements IFMLSidedHandler { } logMissingTextureErrors(); + Loader.instance().loadingComplete(); + SplashProgress.finish(); } /** * Get the server instance diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java index 6e2258ff9..ed4e61382 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java @@ -597,6 +597,7 @@ public class FMLCommonHandler public void processWindowMessages() { + if (sidedDelegate == null) return; sidedDelegate.processWindowMessages(); } diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 801854b09..8b2dded5a 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -464,7 +464,7 @@ public class Loader */ public void loadMods() { - progressBar = ProgressManager.push("Mod Loading", 5); + progressBar = ProgressManager.push("Loading", 7); progressBar.step("Constructing Mods"); initializeLoader(); mods = Lists.newArrayList(); @@ -521,6 +521,7 @@ public class Loader ObjectHolderRegistry.INSTANCE.applyObjectHolders(); progressBar.step("Initializing mods Phase 2"); modController.transition(LoaderState.INITIALIZATION, false); + progressBar.step("Initializing Minecraft Engine"); } private void disableRequestedMods() @@ -708,8 +709,7 @@ public class Loader // Dump the custom registry data map, if necessary GameData.dumpRegistry(minecraftDir); FMLLog.info("Forge Mod Loader has successfully loaded %d mod%s", mods.size(), mods.size() == 1 ? "" : "s"); - ProgressManager.pop(progressBar); - progressBar = null; + progressBar.step("Minecraft setup completion"); } public ICrashCallable getCallableCrashInformation() @@ -988,4 +988,10 @@ public class Loader FMLLog.log(Level.INFO, e, "An error occurred writing the fml mod states file, your disabled change won't persist"); } } + + public void loadingComplete() + { + ProgressManager.pop(progressBar); + progressBar = null; + } }