diff --git a/src/main/java/cpw/mods/fml/client/SplashProgress.java b/src/main/java/cpw/mods/fml/client/SplashProgress.java index 7598ad0..6c63f6c 100644 --- a/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -536,6 +536,10 @@ private static boolean disableSplash() { File configFile = new File(Minecraft.getMinecraft().mcDataDir, "config/splash.properties"); + File parent = configFile.getParentFile(); + if (!parent.exists()) + parent.mkdirs(); + FileReader r = null; enabled = false; config.setProperty("enabled", "false"); diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java index c271f63..0eda6e3 100644 --- a/src/main/java/net/minecraft/client/Minecraft.java +++ b/src/main/java/net/minecraft/client/Minecraft.java @@ -537,14 +537,14 @@ bar.step("Render Global instance"); this.renderGlobal = new RenderGlobal(this); bar.step("Building Blocks Texture"); - this.textureMapBlocks = new TextureMap(0, "textures/blocks"); + this.textureMapBlocks = new TextureMap(0, "textures/blocks", true); bar.step("Anisotropy and Mipmaps"); this.textureMapBlocks.setAnisotropicFiltering(this.gameSettings.anisotropicFiltering); this.textureMapBlocks.setMipmapLevels(this.gameSettings.mipmapLevels); bar.step("Loading Blocks Texture"); this.renderEngine.loadTextureMap(TextureMap.locationBlocksTexture, this.textureMapBlocks); bar.step("Loading Items Texture"); - this.renderEngine.loadTextureMap(TextureMap.locationItemsTexture, new TextureMap(1, "textures/items")); + this.renderEngine.loadTextureMap(TextureMap.locationItemsTexture, new TextureMap(1, "textures/items", true)); bar.step("Viewport"); GL11.glViewport(0, 0, this.displayWidth, this.displayHeight); this.effectRenderer = new EffectRenderer(this.theWorld, this.renderEngine); diff --git a/src/main/java/net/minecraft/client/renderer/texture/Stitcher.java b/src/main/java/net/minecraft/client/renderer/texture/Stitcher.java index 5c7d2a8..1f6acc2 100644 --- a/src/main/java/net/minecraft/client/renderer/texture/Stitcher.java +++ b/src/main/java/net/minecraft/client/renderer/texture/Stitcher.java @@ -60,6 +60,7 @@ public void doStitch() { Stitcher.Holder[] aholder = (Stitcher.Holder[])this.setStitchHolders.toArray(new Stitcher.Holder[this.setStitchHolders.size()]); + cpw.mods.fml.common.ProgressManager.ProgressBar bar = cpw.mods.fml.common.ProgressManager.push("Texture stitching", aholder.length); Arrays.sort(aholder); Stitcher.Holder[] aholder1 = aholder; int i = aholder.length; @@ -67,6 +68,7 @@ for (int j = 0; j < i; ++j) { Stitcher.Holder holder = aholder1[j]; + bar.step(holder.getAtlasSprite().getIconName()); if (!this.allocateSlot(holder)) { @@ -80,6 +82,7 @@ this.currentWidth = MathHelper.roundUpToPowerOfTwo(this.currentWidth); this.currentHeight = MathHelper.roundUpToPowerOfTwo(this.currentHeight); } + cpw.mods.fml.common.ProgressManager.pop(bar); } public List getStichSlots() diff --git a/src/main/java/net/minecraft/client/renderer/texture/TextureMap.java b/src/main/java/net/minecraft/client/renderer/texture/TextureMap.java index a94488a..3264047 100644 --- a/src/main/java/net/minecraft/client/renderer/texture/TextureMap.java +++ b/src/main/java/net/minecraft/client/renderer/texture/TextureMap.java @@ -36,6 +36,7 @@ @SideOnly(Side.CLIENT) public class TextureMap extends AbstractTexture implements ITickableTextureObject, IIconRegister { + private static final boolean ENABLE_SKIP = Boolean.parseBoolean(System.getProperty("fml.skipFirstTextureLoad", "true")); private static final Logger logger = LogManager.getLogger(); public static final ResourceLocation locationBlocksTexture = new ResourceLocation("textures/atlas/blocks.png"); public static final ResourceLocation locationItemsTexture = new ResourceLocation("textures/atlas/items.png"); @@ -48,12 +49,18 @@ private int anisotropicFiltering = 1; private final TextureAtlasSprite missingImage = new TextureAtlasSprite("missingno"); private static final String __OBFID = "CL_00001058"; + private boolean skipFirst = false; public TextureMap(int p_i1281_1_, String p_i1281_2_) { + this(p_i1281_1_, p_i1281_2_, false); + } + public TextureMap(int p_i1281_1_, String p_i1281_2_, boolean skipFirst) + { this.textureType = p_i1281_1_; this.basePath = p_i1281_2_; this.registerIcons(); + this.skipFirst = skipFirst && ENABLE_SKIP; } private void initMissingImage() @@ -100,11 +107,11 @@ this.listAnimatedSprites.clear(); int j = Integer.MAX_VALUE; ForgeHooksClient.onTextureStitchedPre(this); - cpw.mods.fml.common.ProgressManager.ProgressBar bar = cpw.mods.fml.common.ProgressManager.push("Texture stitching", this.mapRegisteredSprites.size()); + cpw.mods.fml.common.ProgressManager.ProgressBar bar = cpw.mods.fml.common.ProgressManager.push("Texture Loading", skipFirst ? 0 : this.mapRegisteredSprites.size()); Iterator iterator = this.mapRegisteredSprites.entrySet().iterator(); TextureAtlasSprite textureatlassprite; - while (iterator.hasNext()) + while (!skipFirst && iterator.hasNext()) { Entry entry = (Entry)iterator.next(); ResourceLocation resourcelocation = new ResourceLocation((String)entry.getKey()); @@ -197,9 +204,9 @@ } Iterator iterator1 = this.mapRegisteredSprites.values().iterator(); - bar = cpw.mods.fml.common.ProgressManager.push("Mipmap generation", this.mapRegisteredSprites.size()); + bar = cpw.mods.fml.common.ProgressManager.push("Mipmap generation", skipFirst ? 0 : this.mapRegisteredSprites.size()); - while (iterator1.hasNext()) + while (!skipFirst && iterator1.hasNext()) { final TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)iterator1.next(); bar.step(textureatlassprite1.getIconName()); @@ -244,6 +251,7 @@ this.missingImage.generateMipmaps(this.mipmapLevels); stitcher.addSprite(this.missingImage); cpw.mods.fml.common.ProgressManager.pop(bar); + skipFirst = false; bar = cpw.mods.fml.common.ProgressManager.push("Texture creation", 3); try