001package net.minecraft.client.texturepacks;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import java.io.BufferedInputStream;
006import java.io.File;
007import java.io.FileInputStream;
008import java.io.IOException;
009import java.io.InputStream;
010
011@SideOnly(Side.CLIENT)
012public class TexturePackFolder extends TexturePackImplementation
013{
014    public TexturePackFolder(String par1Str, File par2File)
015    {
016        super(par1Str, par2File, par2File.getName());
017    }
018
019    /**
020     * Gives a texture resource as InputStream.
021     */
022    public InputStream getResourceAsStream(String par1Str)
023    {
024        try
025        {
026            File var2 = new File(this.texturePackFile, par1Str.substring(1));
027
028            if (var2.exists())
029            {
030                return new BufferedInputStream(new FileInputStream(var2));
031            }
032        }
033        catch (IOException var3)
034        {
035            ;
036        }
037
038        return super.getResourceAsStream(par1Str);
039    }
040}