// Path: src/main/java/team/creative/enhancedvisuals/api/Visual.java
// public class Visual {
//     
//     public final VisualType type;
//     public final VisualHandler handler;
//     
//     private float opacity;
//     
//     public final boolean endless;
//     public final Curve animation;
//     
//     private boolean displayed = false;
//     private int tick = 0;
//     
//     public Color color;
//     
//     public int variant;
//     
//     public Visual(VisualType type, VisualHandler handler, Curve animation, int variant) {
//         this.type = type;
//         this.handler = handler;
//         this.animation = animation;
//         this.variant = variant;
//         this.endless = false;
//         this.color = type.getColor();
//     }
//     
//     public Visual(VisualType type, VisualHandler handler, int variant) {
//         this.type = type;
//         this.handler = handler;
//         this.animation = null;
//         this.variant = variant;
//         this.endless = true;
//         this.color = type.getColor();
//     }
//     
//     public void setOpacityInternal(float opacity) {
//         this.opacity = opacity;
//     }
//     
//     public float getOpacityInternal() {
//         return opacity;
//     }
//     
//     public float getOpacity() {
//         return handler.opacity * opacity * type.opacity;
//     }
//     
//     public boolean displayed() {
//         return displayed;
//     }
//     
//     public void addToDisplay() {
//         displayed = true;
//     }
//     
//     public void removeFromDisplay() {
//         displayed = false;
//     }
//     
//     public VisualCategory getCategory() {
//         return type.cat;
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public void render(TextureManager manager, int screenWidth, int screenHeight, float partialTicks) {
//         type.render(handler, this, manager, screenWidth, screenHeight, partialTicks);
//     }
//     
//     public boolean isVisible() {
//         return type.isVisible(handler, this);
//     }
//     
//     public boolean tick() {
//         if (endless)
//             return true;
//         opacity = (float) animation.valueAt(tick++);
//         return opacity > 0;
//     }
//     
//     public int getWidth(int screenWidth) {
//         return screenWidth;
//     }
//     
//     public int getHeight(int screenHeight) {
//         return screenHeight;
//     }
//     
//     public boolean isAffectedByWater() {
//         return type.isAffectedByWater();
//     }
//     
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/api/VisualHandler.java
// public class VisualHandler implements ICreativeConfig {
//     
//     @CreativeConfig
//     public boolean enabled = true;
//     
//     @CreativeConfig
//     @CreativeConfig.DecimalRange(max = 1, min = 0)
//     public float opacity = 1;
//     
//     @Override
//     public void configured() {
//         
//     }
//     
//     public void tick(@Nullable EntityPlayer player) {
//         
//     }
//     
//     public boolean isEnabled(@Nullable EntityPlayer player) {
//         return enabled && opacity > 0;
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location) {
//         playSound(location, null, 1.0F);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, BlockPos pos) {
//         playSound(location, pos, 1.0F);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, float volume) {
//         playSound(location, null, volume);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, BlockPos pos, float volume) {
//         if (!EVClient.shouldRender())
//             return;
//         if (pos != null)
//             Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSound(location, SoundCategory.MASTER, volume, 1, pos));
//         else
//             Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSound(location, SoundCategory.MASTER, volume, 1));
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSoundFadeOut(ResourceLocation location, BlockPos pos, DecimalCurve volume) {
//         if (!EVClient.shouldRender())
//             return;
//         if (pos != null)
//             Minecraft.getMinecraft().getSoundHandler().playSound(new TickedSound(location, SoundCategory.MASTER, 1, pos, volume));
//         else
//             Minecraft.getMinecraft().getSoundHandler().playSound(new TickedSound(location, SoundCategory.MASTER, 1, volume));
//     }
//     
// }


import net.minecraft.client.shader.Shader;
import net.minecraft.client.shader.ShaderUniform;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import team.creative.enhancedvisuals.api.Visual;
import team.creative.enhancedvisuals.api.VisualHandler;
package team.creative.enhancedvisuals.api.type;


public class VisualTypeSaturation extends VisualTypeShader {
    
    public VisualTypeSaturation(String name) {
        super(name, new ResourceLocation("shaders/post/desaturate.json"));
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public void changeProperties(float intensity) {
        for (Shader mcShader : shaderGroup.getShaders()) {
            ShaderUniform shaderuniform = mcShader.getShaderManager().getShaderUniform("Saturation");
            
            if (shaderuniform != null)
                shaderuniform.set(intensity);
        }
    }
    
    @Override
// Path: src/main/java/team/creative/enhancedvisuals/api/Visual.java
// public class Visual {
//     
//     public final VisualType type;
//     public final VisualHandler handler;
//     
//     private float opacity;
//     
//     public final boolean endless;
//     public final Curve animation;
//     
//     private boolean displayed = false;
//     private int tick = 0;
//     
//     public Color color;
//     
//     public int variant;
//     
//     public Visual(VisualType type, VisualHandler handler, Curve animation, int variant) {
//         this.type = type;
//         this.handler = handler;
//         this.animation = animation;
//         this.variant = variant;
//         this.endless = false;
//         this.color = type.getColor();
//     }
//     
//     public Visual(VisualType type, VisualHandler handler, int variant) {
//         this.type = type;
//         this.handler = handler;
//         this.animation = null;
//         this.variant = variant;
//         this.endless = true;
//         this.color = type.getColor();
//     }
//     
//     public void setOpacityInternal(float opacity) {
//         this.opacity = opacity;
//     }
//     
//     public float getOpacityInternal() {
//         return opacity;
//     }
//     
//     public float getOpacity() {
//         return handler.opacity * opacity * type.opacity;
//     }
//     
//     public boolean displayed() {
//         return displayed;
//     }
//     
//     public void addToDisplay() {
//         displayed = true;
//     }
//     
//     public void removeFromDisplay() {
//         displayed = false;
//     }
//     
//     public VisualCategory getCategory() {
//         return type.cat;
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public void render(TextureManager manager, int screenWidth, int screenHeight, float partialTicks) {
//         type.render(handler, this, manager, screenWidth, screenHeight, partialTicks);
//     }
//     
//     public boolean isVisible() {
//         return type.isVisible(handler, this);
//     }
//     
//     public boolean tick() {
//         if (endless)
//             return true;
//         opacity = (float) animation.valueAt(tick++);
//         return opacity > 0;
//     }
//     
//     public int getWidth(int screenWidth) {
//         return screenWidth;
//     }
//     
//     public int getHeight(int screenHeight) {
//         return screenHeight;
//     }
//     
//     public boolean isAffectedByWater() {
//         return type.isAffectedByWater();
//     }
//     
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/api/VisualHandler.java
// public class VisualHandler implements ICreativeConfig {
//     
//     @CreativeConfig
//     public boolean enabled = true;
//     
//     @CreativeConfig
//     @CreativeConfig.DecimalRange(max = 1, min = 0)
//     public float opacity = 1;
//     
//     @Override
//     public void configured() {
//         
//     }
//     
//     public void tick(@Nullable EntityPlayer player) {
//         
//     }
//     
//     public boolean isEnabled(@Nullable EntityPlayer player) {
//         return enabled && opacity > 0;
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location) {
//         playSound(location, null, 1.0F);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, BlockPos pos) {
//         playSound(location, pos, 1.0F);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, float volume) {
//         playSound(location, null, volume);
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSound(ResourceLocation location, BlockPos pos, float volume) {
//         if (!EVClient.shouldRender())
//             return;
//         if (pos != null)
//             Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSound(location, SoundCategory.MASTER, volume, 1, pos));
//         else
//             Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSound(location, SoundCategory.MASTER, volume, 1));
//     }
//     
//     @SideOnly(Side.CLIENT)
//     public synchronized void playSoundFadeOut(ResourceLocation location, BlockPos pos, DecimalCurve volume) {
//         if (!EVClient.shouldRender())
//             return;
//         if (pos != null)
//             Minecraft.getMinecraft().getSoundHandler().playSound(new TickedSound(location, SoundCategory.MASTER, 1, pos, volume));
//         else
//             Minecraft.getMinecraft().getSoundHandler().playSound(new TickedSound(location, SoundCategory.MASTER, 1, volume));
//     }
//     
// }


// Path: src/main/java/team/creative/enhancedvisuals/api/type/VisualTypeSaturation.java
import net.minecraft.client.shader.Shader;
import net.minecraft.client.shader.ShaderUniform;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import team.creative.enhancedvisuals.api.Visual;
import team.creative.enhancedvisuals.api.VisualHandler;

package team.creative.enhancedvisuals.api.type;


public class VisualTypeSaturation extends VisualTypeShader {
    
    public VisualTypeSaturation(String name) {
        super(name, new ResourceLocation("shaders/post/desaturate.json"));
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public void changeProperties(float intensity) {
        for (Shader mcShader : shaderGroup.getShaders()) {
            ShaderUniform shaderuniform = mcShader.getShaderManager().getShaderUniform("Saturation");
            
            if (shaderuniform != null)
                shaderuniform.set(intensity);
        }
    }
    
    @Override
    public boolean isVisible(VisualHandler handler, Visual visual) {