Re-gather list of Icons when atlas textures are stitched, allows for addition/removal of blocks/items after the atlas's inital constrction.
This commit is contained in:
parent
22be4b49d5
commit
dfc26937ca
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue