// Path: src/codechicken/lib/render/SpriteSheetManager.java
// @SideOnly(Side.CLIENT)
// public static class SpriteSheet implements IIconRegister
// {
//     private int tilesX;
//     private int tilesY;
//     private ArrayList<Integer> newSprites = new ArrayList<Integer>();
//     private TextureSpecial[] sprites;
//     private ResourceLocation resource;
//     private TextureDataHolder texture;
//     private int spriteWidth;
//     private int spriteHeight;
// 
//     public int atlasIndex;
// 
//     private SpriteSheet(int tilesX, int tilesY, ResourceLocation textureFile) {
//         this.tilesX = tilesX;
//         this.tilesY = tilesY;
//         this.resource = textureFile;
//         sprites = new TextureSpecial[tilesX * tilesY];
//     }
// 
//     public void requestIndicies(int... indicies) {
//         for (int i : indicies)
//             setupSprite(i);
//     }
// 
//     @Override
//     public void registerIcons(TextureMap textureMap) {
//         if (TextureUtils.refreshTexture(textureMap, resource.getResourcePath())) {
//             reloadTexture();
//             for (TextureSpecial sprite : sprites)
//                 if (sprite != null)
//                     textureMap.setTextureEntry(sprite.getIconName(), sprite);
//         } else {
//             for (int i : newSprites)
//                 textureMap.setTextureEntry(sprites[i].getIconName(), sprites[i]);
//         }
//         newSprites.clear();
//     }
// 
//     public TextureSpecial setupSprite(int i) {
//         if (sprites[i] == null) {
//             String name = resource + "_" + i;
//             sprites[i] = new TextureSpecial(name).baseFromSheet(this, i);
//             newSprites.add(i);
//         }
//         return sprites[i];
//     }
// 
//     private void reloadTexture() {
//         texture = TextureUtils.loadTexture(resource);
//         spriteWidth = texture.width / tilesX;
//         spriteHeight = texture.height / tilesY;
//     }
// 
//     public TextureAtlasSprite getSprite(int index) {
//         TextureAtlasSprite i = sprites[index];
//         if (i == null)
//             throw new IllegalArgumentException("Sprite at index: " + index + " from texture file " + resource + " was not preloaded.");
//         return i;
//     }
// 
//     public TextureDataHolder createSprite(int spriteIndex) {
//         int sx = spriteIndex % tilesX;
//         int sy = spriteIndex / tilesX;
//         TextureDataHolder sprite = new TextureDataHolder(spriteWidth, spriteHeight);
//         TextureUtils.copySubImg(texture.data, texture.width, sx * spriteWidth, sy * spriteHeight,
//                 spriteWidth, spriteHeight,
//                 sprite.data, spriteWidth, 0, 0);
//         return sprite;
//     }
// 
//     public int spriteWidth() {
//         return spriteWidth;
//     }
// 
//     public int spriteHeight() {
//         return spriteHeight;
//     }
// 
//     public TextureSpecial bindTextureFX(int i, TextureFX textureFX) {
//         return setupSprite(i).addTextureFX(textureFX);
//     }
// 
//     public SpriteSheet selfRegister(int atlas) {
//         TextureUtils.addIconRegister(this);
//         return this;
//     }
// }


import codechicken.lib.render.SpriteSheetManager.SpriteSheet;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
package codechicken.lib.render;


@SideOnly(Side.CLIENT)
public class TextureFX
{
    public int[] imageData;
    public int tileSizeBase = 16;
    public int tileSizeSquare = 256;
    public int tileSizeMask = 15;
    public int tileSizeSquareMask = 255;

    public boolean anaglyphEnabled;
    public TextureSpecial texture;

// Path: src/codechicken/lib/render/SpriteSheetManager.java
// @SideOnly(Side.CLIENT)
// public static class SpriteSheet implements IIconRegister
// {
//     private int tilesX;
//     private int tilesY;
//     private ArrayList<Integer> newSprites = new ArrayList<Integer>();
//     private TextureSpecial[] sprites;
//     private ResourceLocation resource;
//     private TextureDataHolder texture;
//     private int spriteWidth;
//     private int spriteHeight;
// 
//     public int atlasIndex;
// 
//     private SpriteSheet(int tilesX, int tilesY, ResourceLocation textureFile) {
//         this.tilesX = tilesX;
//         this.tilesY = tilesY;
//         this.resource = textureFile;
//         sprites = new TextureSpecial[tilesX * tilesY];
//     }
// 
//     public void requestIndicies(int... indicies) {
//         for (int i : indicies)
//             setupSprite(i);
//     }
// 
//     @Override
//     public void registerIcons(TextureMap textureMap) {
//         if (TextureUtils.refreshTexture(textureMap, resource.getResourcePath())) {
//             reloadTexture();
//             for (TextureSpecial sprite : sprites)
//                 if (sprite != null)
//                     textureMap.setTextureEntry(sprite.getIconName(), sprite);
//         } else {
//             for (int i : newSprites)
//                 textureMap.setTextureEntry(sprites[i].getIconName(), sprites[i]);
//         }
//         newSprites.clear();
//     }
// 
//     public TextureSpecial setupSprite(int i) {
//         if (sprites[i] == null) {
//             String name = resource + "_" + i;
//             sprites[i] = new TextureSpecial(name).baseFromSheet(this, i);
//             newSprites.add(i);
//         }
//         return sprites[i];
//     }
// 
//     private void reloadTexture() {
//         texture = TextureUtils.loadTexture(resource);
//         spriteWidth = texture.width / tilesX;
//         spriteHeight = texture.height / tilesY;
//     }
// 
//     public TextureAtlasSprite getSprite(int index) {
//         TextureAtlasSprite i = sprites[index];
//         if (i == null)
//             throw new IllegalArgumentException("Sprite at index: " + index + " from texture file " + resource + " was not preloaded.");
//         return i;
//     }
// 
//     public TextureDataHolder createSprite(int spriteIndex) {
//         int sx = spriteIndex % tilesX;
//         int sy = spriteIndex / tilesX;
//         TextureDataHolder sprite = new TextureDataHolder(spriteWidth, spriteHeight);
//         TextureUtils.copySubImg(texture.data, texture.width, sx * spriteWidth, sy * spriteHeight,
//                 spriteWidth, spriteHeight,
//                 sprite.data, spriteWidth, 0, 0);
//         return sprite;
//     }
// 
//     public int spriteWidth() {
//         return spriteWidth;
//     }
// 
//     public int spriteHeight() {
//         return spriteHeight;
//     }
// 
//     public TextureSpecial bindTextureFX(int i, TextureFX textureFX) {
//         return setupSprite(i).addTextureFX(textureFX);
//     }
// 
//     public SpriteSheet selfRegister(int atlas) {
//         TextureUtils.addIconRegister(this);
//         return this;
//     }
// }


// Path: src/codechicken/lib/render/TextureFX.java
import codechicken.lib.render.SpriteSheetManager.SpriteSheet;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;

package codechicken.lib.render;


@SideOnly(Side.CLIENT)
public class TextureFX
{
    public int[] imageData;
    public int tileSizeBase = 16;
    public int tileSizeSquare = 256;
    public int tileSizeMask = 15;
    public int tileSizeSquareMask = 255;

    public boolean anaglyphEnabled;
    public TextureSpecial texture;

    public TextureFX(int spriteIndex, SpriteSheet sheet) {