public int[] getTextureContents(String par1Str)
    {
        TexturePackBase var2 = this.texturePack.selectedTexturePack;
        int[] var3 = (int[])this.textureContentsMap.get(par1Str);

        if (var3 != null)
        {
            return var3;
        }
        else
        {
            try
            {
                Object var6 = null;

                if (par1Str.startsWith("##"))
                {
                    var3 = this.getImageContentsAndAllocate(this.unwrapImageByColumns(this.readTextureImage(var2.getResourceAsStream(par1Str.substring(2)))));
                }
                else if (par1Str.startsWith("%clamp%"))
                {
                    this.clampTexture = true;
                    var3 = this.getImageContentsAndAllocate(this.readTextureImage(var2.getResourceAsStream(par1Str.substring(7))));
                    this.clampTexture = false;
                }
                else if (par1Str.startsWith("%blur%"))
                {
                    this.blurTexture = true;
                    this.clampTexture = true;
                    var3 = this.getImageContentsAndAllocate(this.readTextureImage(var2.getResourceAsStream(par1Str.substring(6))));
                    this.clampTexture = false;
                    this.blurTexture = false;
                }
                else
                {
                    InputStream var7 = var2.getResourceAsStream(par1Str);

                    if (var7 == null)
                    {
                        var3 = this.getImageContentsAndAllocate(this.missingTextureImage);
                    }
                    else
                    {
                        var3 = this.getImageContentsAndAllocate(this.readTextureImage(var7));
                    }
                }

                this.textureContentsMap.put(par1Str, var3);
                return var3;
            }
            catch (IOException var5)
            {
                var5.printStackTrace();
                int[] var4 = this.getImageContentsAndAllocate(this.missingTextureImage);
                this.textureContentsMap.put(par1Str, var4);
                return var4;
            }
        }
    }