// Path: src/main/java/guichaguri/betterfps/api/IBlock.java
// public interface IBlock {
// 
//     /**
//      * Method added by Forge. Reimplemented for compatibility with it.
//      */
//     boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon);
// 
//     /**
//      * Method added by Forge. Reimplemented for compatibility with it.
//      */
//     @Nullable
//     float[] getBeaconColorMultiplier(IBlockState state, World world, BlockPos pos, BlockPos beaconPos);
// 
// }
// 
// Path: src/main/java/guichaguri/betterfps/transformers/Conditions.java
// public class Conditions {
// 
//     protected static final List<Mappings> patched = new ArrayList<Mappings>();
// 
//     public static final String FAST_HOPPER = "fastHopper";
//     public static final String FAST_BEACON = "fastBeacon";
//     public static final String FAST_SEARCH = "fastSearch";
//     public static final String FAST_BEAM_RENDER = "fastBeaconBeamRender";
//     public static final String FOG_DISABLED = "fogDisabled";
// 
//     /**
//      * Checks whether the condition identifier is met
//      */
//     public static boolean shouldPatch(String condition) {
//         BetterFpsConfig config = BetterFpsHelper.getConfig();
// 
//         if(condition.equals(FAST_HOPPER)) {
//             return config.fastHopper;
//         } else if(condition.equals(FAST_BEACON)) {
//             return config.fastBeacon;
//         } else if(condition.equals(FAST_SEARCH)) {
//             return config.fastSearch;
//         } else if(condition.equals(FAST_BEAM_RENDER)) {
//             return !config.beaconBeam;
//         } else if(condition.equals(FOG_DISABLED)) {
//             return !config.fog;
//         }
// 
//         return true;
//     }
// 
//     /**
//      * Checks whether the {@link Condition} annotation has its condition met
//      */
//     public static boolean shouldPatch(List<AnnotationNode> annotations) {
//         AnnotationNode condition = ASMUtils.getAnnotation(annotations, Condition.class);
//         if(condition != null) {
//             String id = ASMUtils.getAnnotationValue(condition, "value", String.class);
//             return id == null || shouldPatch(id);
//         }
//         return true;
//     }
// 
//     public static boolean isPatched(Mappings name) {
//         return patched.contains(name);
//     }
// 
// }


import guichaguri.betterfps.api.IBlock;
import guichaguri.betterfps.transformers.Conditions;
import guichaguri.betterfps.transformers.annotations.Condition;
import guichaguri.betterfps.transformers.annotations.Copy;
import guichaguri.betterfps.transformers.annotations.Copy.Mode;
import java.util.Arrays;
import net.minecraft.advancements.CriteriaTriggers;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStainedGlass;
import net.minecraft.block.BlockStainedGlassPane;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntityBeacon;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
     */
    @Copy
    private void updateGlassLayers(int x, int y, int z) {
        BeamSegment beam = new BeamSegment(EntitySheep.getDyeRgb(EnumDyeColor.WHITE));
        float[] oldColor = null;

        beamSegments.clear();
        beamSegments.add(beam);

        isComplete = true;

        for(int blockY = y + 1; blockY < world.getActualHeight(); blockY++) {

            BlockPos blockPos = new BlockPos(x, blockY, z);
            IBlockState state = world.getBlockState(blockPos);
            Block b = state.getBlock();
            float[] color = null;

            if(b == Blocks.STAINED_GLASS) {
                color = EntitySheep.getDyeRgb(state.getValue(BlockStainedGlass.COLOR));
            } else if(b == Blocks.STAINED_GLASS_PANE) {
                color = EntitySheep.getDyeRgb(state.getValue(BlockStainedGlassPane.COLOR));
            } else {
                if(b != Blocks.BEDROCK && state.getLightOpacity() >= 15) {
                    isComplete = false;
                    beamSegments.clear();
                    break;
                }

                // Forge Compatibility
// Path: src/main/java/guichaguri/betterfps/api/IBlock.java
// public interface IBlock {
// 
//     /**
//      * Method added by Forge. Reimplemented for compatibility with it.
//      */
//     boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon);
// 
//     /**
//      * Method added by Forge. Reimplemented for compatibility with it.
//      */
//     @Nullable
//     float[] getBeaconColorMultiplier(IBlockState state, World world, BlockPos pos, BlockPos beaconPos);
// 
// }
// 
// Path: src/main/java/guichaguri/betterfps/transformers/Conditions.java
// public class Conditions {
// 
//     protected static final List<Mappings> patched = new ArrayList<Mappings>();
// 
//     public static final String FAST_HOPPER = "fastHopper";
//     public static final String FAST_BEACON = "fastBeacon";
//     public static final String FAST_SEARCH = "fastSearch";
//     public static final String FAST_BEAM_RENDER = "fastBeaconBeamRender";
//     public static final String FOG_DISABLED = "fogDisabled";
// 
//     /**
//      * Checks whether the condition identifier is met
//      */
//     public static boolean shouldPatch(String condition) {
//         BetterFpsConfig config = BetterFpsHelper.getConfig();
// 
//         if(condition.equals(FAST_HOPPER)) {
//             return config.fastHopper;
//         } else if(condition.equals(FAST_BEACON)) {
//             return config.fastBeacon;
//         } else if(condition.equals(FAST_SEARCH)) {
//             return config.fastSearch;
//         } else if(condition.equals(FAST_BEAM_RENDER)) {
//             return !config.beaconBeam;
//         } else if(condition.equals(FOG_DISABLED)) {
//             return !config.fog;
//         }
// 
//         return true;
//     }
// 
//     /**
//      * Checks whether the {@link Condition} annotation has its condition met
//      */
//     public static boolean shouldPatch(List<AnnotationNode> annotations) {
//         AnnotationNode condition = ASMUtils.getAnnotation(annotations, Condition.class);
//         if(condition != null) {
//             String id = ASMUtils.getAnnotationValue(condition, "value", String.class);
//             return id == null || shouldPatch(id);
//         }
//         return true;
//     }
// 
//     public static boolean isPatched(Mappings name) {
//         return patched.contains(name);
//     }
// 
// }


// Path: src/main/java/guichaguri/betterfps/patches/block/FastBeacon.java
import guichaguri.betterfps.api.IBlock;
import guichaguri.betterfps.transformers.Conditions;
import guichaguri.betterfps.transformers.annotations.Condition;
import guichaguri.betterfps.transformers.annotations.Copy;
import guichaguri.betterfps.transformers.annotations.Copy.Mode;
import java.util.Arrays;
import net.minecraft.advancements.CriteriaTriggers;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStainedGlass;
import net.minecraft.block.BlockStainedGlassPane;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntityBeacon;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;

     */
    @Copy
    private void updateGlassLayers(int x, int y, int z) {
        BeamSegment beam = new BeamSegment(EntitySheep.getDyeRgb(EnumDyeColor.WHITE));
        float[] oldColor = null;

        beamSegments.clear();
        beamSegments.add(beam);

        isComplete = true;

        for(int blockY = y + 1; blockY < world.getActualHeight(); blockY++) {

            BlockPos blockPos = new BlockPos(x, blockY, z);
            IBlockState state = world.getBlockState(blockPos);
            Block b = state.getBlock();
            float[] color = null;

            if(b == Blocks.STAINED_GLASS) {
                color = EntitySheep.getDyeRgb(state.getValue(BlockStainedGlass.COLOR));
            } else if(b == Blocks.STAINED_GLASS_PANE) {
                color = EntitySheep.getDyeRgb(state.getValue(BlockStainedGlassPane.COLOR));
            } else {
                if(b != Blocks.BEDROCK && state.getLightOpacity() >= 15) {
                    isComplete = false;
                    beamSegments.clear();
                    break;
                }

                // Forge Compatibility
                float[] customColor = ((IBlock)b).getBeaconColorMultiplier(state, world, blockPos, pos);