From fe2243df9fedb89425e362a463bb747cb4f3cea5 Mon Sep 17 00:00:00 2001 From: LexManos Date: Mon, 8 Aug 2016 17:54:12 -0700 Subject: [PATCH] Removed unintentional functionality when using the Splash Screen. --- .../minecraftforge/fml/client/SplashProgress.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/client/SplashProgress.java b/src/main/java/net/minecraftforge/fml/client/SplashProgress.java index 88eb6ffd5..2a2c8e3e5 100644 --- a/src/main/java/net/minecraftforge/fml/client/SplashProgress.java +++ b/src/main/java/net/minecraftforge/fml/client/SplashProgress.java @@ -245,7 +245,7 @@ public class SplashProgress { setGL(); fontTexture = new Texture(fontLoc); - logoTexture = new Texture(logoLoc); + logoTexture = new Texture(logoLoc, false); forgeTexture = new Texture(forgeLoc); glEnable(GL_TEXTURE_2D); fontRenderer = new SplashFontRenderer(); @@ -642,12 +642,17 @@ public class SplashProgress private final int size; public Texture(ResourceLocation location) + { + this(location, true); + } + + public Texture(ResourceLocation location, boolean allowRP) { InputStream s = null; try { this.location = location; - s = open(location); + s = open(location, allowRP); ImageInputStream stream = ImageIO.createImageInputStream(s); Iterator readers = ImageIO.getImageReaders(stream); if(!readers.hasNext()) throw new IOException("No suitable reader found for image" + location); @@ -811,8 +816,11 @@ public class SplashProgress } } - private static InputStream open(ResourceLocation loc) throws IOException + private static InputStream open(ResourceLocation loc, boolean allowRP) throws IOException { + if (!allowRP) + return mcPack.getInputStream(loc); + if(miscPack.resourceExists(loc)) { return miscPack.getInputStream(loc);