001    package net.minecraft.client.texturepacks;
002    
003    import cpw.mods.fml.relauncher.Side;
004    import cpw.mods.fml.relauncher.SideOnly;
005    import java.io.BufferedInputStream;
006    import java.io.File;
007    import java.io.FileInputStream;
008    import java.io.IOException;
009    import java.io.InputStream;
010    
011    @SideOnly(Side.CLIENT)
012    public 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    }