diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 713b936be..9db4e417b 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -16,6 +16,15 @@ Iterator iterator = this.field_110574_e.entrySet().iterator(); while (iterator.hasNext()) +@@ -69,7 +71,7 @@ + Entry entry = (Entry)iterator.next(); + String s = (String)entry.getKey(); + TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)entry.getValue(); +- ResourceLocation resourcelocation = new ResourceLocation(this.basePath + s + ".png"); ++ ResourceLocation resourcelocation = new ResourceLocation(fixDomain(basePath, s) + ".png"); + + try + { @@ -142,6 +144,7 @@ textureatlassprite1 = (TextureAtlasSprite)iterator1.next(); textureatlassprite1.copyFrom(this.missingImage); @@ -32,7 +41,7 @@ } Object object = (TextureAtlasSprite)this.field_110574_e.get(par1Str); -@@ -253,4 +257,37 @@ +@@ -253,4 +257,58 @@ { this.updateAnimations(); } @@ -68,5 +77,26 @@ + return true; + } + return false; ++ } ++ ++ //This properly moves the domain, if provided, to the front of the string before concatenating ++ private String fixDomain(String base, String complex) ++ { ++ int idx = complex.indexOf(':'); ++ if (idx == -1) ++ { ++ return base + complex; ++ } ++ ++ String name = complex.substring(idx + 1, complex.length()); ++ if (idx > 1) ++ { ++ String domain = complex.substring(0, idx); ++ return domain + ':' + base + name; ++ } ++ else ++ { ++ return base + name; ++ } + } }