From dfc26937ca172e1c432a6ac8d31ac120cf9af120 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 5 Jul 2013 22:50:55 -0700 Subject: [PATCH] Re-gather list of Icons when atlas textures are stitched, allows for addition/removal of blocks/items after the atlas's inital constrction. --- .../renderer/texture/TextureMap.java.patch | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 8ccfa7629b..4731005d12 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -8,7 +8,13 @@ @SideOnly(Side.CLIENT) public class TextureMap extends AbstractTexture implements TickableTextureObject, IconRegister -@@ -62,6 +63,7 @@ +@@ -58,10 +59,13 @@ + + public void func_110571_b(ResourceManager par1ResourceManager) + { ++ func_110573_f(); //Re-gather list of Icons, allows for addition/removal of blocks/items after this map was inital constrcuted. ++ + int i = Minecraft.getGLMaximumTextureSize(); Stitcher stitcher = new Stitcher(i, i, true); this.mapTexturesStiched.clear(); this.listTextureStiched.clear(); @@ -16,7 +22,7 @@ Iterator iterator = this.field_110574_e.entrySet().iterator(); while (iterator.hasNext()) -@@ -69,11 +71,14 @@ +@@ -69,11 +73,14 @@ Entry entry = (Entry)iterator.next(); String s = (String)entry.getKey(); TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)entry.getValue(); @@ -33,7 +39,7 @@ } catch (RuntimeException runtimeexception) { -@@ -142,6 +147,7 @@ +@@ -142,6 +149,7 @@ textureatlassprite1 = (TextureAtlasSprite)iterator1.next(); textureatlassprite1.copyFrom(this.missingImage); } @@ -41,7 +47,7 @@ } private void func_110573_f() -@@ -212,6 +218,7 @@ +@@ -212,6 +220,7 @@ if (par1Str == null) { (new RuntimeException("Don\'t register null!")).printStackTrace(); @@ -49,7 +55,7 @@ } Object object = (TextureAtlasSprite)this.field_110574_e.get(par1Str); -@@ -253,4 +260,37 @@ +@@ -253,4 +262,37 @@ { this.updateAnimations(); }