// Path: src/main/java/team/creative/enhancedvisuals/client/EVClient.java
// @SideOnly(Side.CLIENT)
// public class EVClient extends EVServer {
//     
//     private static Minecraft mc = Minecraft.getMinecraft();
//     
//     @Override
//     public void load(FMLInitializationEvent event) {
//         ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
//             
//             @Override
//             public void onResourceManagerReload(IResourceManager resourceManager) {
//                 VisualManager.clearParticles();
//                 
//                 for (VisualType type : VisualType.getTypes()) {
//                     type.loadResources(resourceManager);
//                 }
//             }
//         });
//         
//         IResourceManager manager = mc.getResourceManager();
//         for (VisualType type : VisualType.getTypes())
//             type.loadResources(manager);
//         
//         MinecraftForge.EVENT_BUS.register(EVRenderer.class);
//     }
//     
//     public static boolean shouldRender() {
//         return mc.player != null ? (!mc.player.isSpectator() && (!mc.player.isCreative() || EnhancedVisuals.CONFIG.doEffectsInCreative)) : true;
//     }
//     
//     public static boolean shouldTick() {
//         return true;
//     }
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/client/sound/PositionedSound.java
// public class PositionedSound extends net.minecraft.client.audio.PositionedSound {
// 	
// 	public PositionedSound(ResourceLocation location, SoundCategory category, float volume, float pitch) {
// 		super(location, category);
// 		this.volume = volume;
// 		this.pitch = pitch;
// 		this.attenuationType = AttenuationType.NONE;
// 	}
// 	
// 	public PositionedSound(ResourceLocation location, SoundCategory category, float volume, float pitch, BlockPos pos) {
// 		this(location, category, volume, pitch);
// 		this.xPosF = pos.getX();
// 		this.yPosF = pos.getY();
// 		this.zPosF = pos.getZ();
// 		this.attenuationType = AttenuationType.LINEAR;
// 	}
// 	
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/client/sound/TickedSound.java
// public class TickedSound extends PositionedSound implements ITickableSound {
// 	
// 	public int tick = 0;
// 	public DecimalCurve volumeGraph;
// 	
// 	public TickedSound(ResourceLocation location, SoundCategory category, float pitch, DecimalCurve volumeGraph) {
// 		super(location, category, (float) volumeGraph.valueAt(0), pitch);
// 		this.volumeGraph = volumeGraph;
// 		this.repeat = true;
// 	}
// 	
// 	public TickedSound(ResourceLocation location, SoundCategory category, float pitch, BlockPos pos, DecimalCurve volumeGraph) {
// 		super(location, category, (float) volumeGraph.valueAt(0), pitch, pos);
// 		this.volumeGraph = volumeGraph;
// 		this.repeat = true;
// 	}
// 	
// 	@Override
// 	public boolean isDonePlaying() {
// 		return volume == 0;
// 	}
// 	
// 	@Override
// 	public void update() {
// 		tick++;
// 		volume = (float) volumeGraph.valueAt(tick);
// 	}
// 	
// }


import javax.annotation.Nullable;
import com.creativemd.creativecore.common.config.api.CreativeConfig;
import com.creativemd.creativecore.common.config.api.ICreativeConfig;
import com.creativemd.creativecore.common.config.premade.curve.DecimalCurve;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import team.creative.enhancedvisuals.client.EVClient;
import team.creative.enhancedvisuals.client.sound.PositionedSound;
import team.creative.enhancedvisuals.client.sound.TickedSound;
    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
// Path: src/main/java/team/creative/enhancedvisuals/client/EVClient.java
// @SideOnly(Side.CLIENT)
// public class EVClient extends EVServer {
//     
//     private static Minecraft mc = Minecraft.getMinecraft();
//     
//     @Override
//     public void load(FMLInitializationEvent event) {
//         ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
//             
//             @Override
//             public void onResourceManagerReload(IResourceManager resourceManager) {
//                 VisualManager.clearParticles();
//                 
//                 for (VisualType type : VisualType.getTypes()) {
//                     type.loadResources(resourceManager);
//                 }
//             }
//         });
//         
//         IResourceManager manager = mc.getResourceManager();
//         for (VisualType type : VisualType.getTypes())
//             type.loadResources(manager);
//         
//         MinecraftForge.EVENT_BUS.register(EVRenderer.class);
//     }
//     
//     public static boolean shouldRender() {
//         return mc.player != null ? (!mc.player.isSpectator() && (!mc.player.isCreative() || EnhancedVisuals.CONFIG.doEffectsInCreative)) : true;
//     }
//     
//     public static boolean shouldTick() {
//         return true;
//     }
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/client/sound/PositionedSound.java
// public class PositionedSound extends net.minecraft.client.audio.PositionedSound {
// 	
// 	public PositionedSound(ResourceLocation location, SoundCategory category, float volume, float pitch) {
// 		super(location, category);
// 		this.volume = volume;
// 		this.pitch = pitch;
// 		this.attenuationType = AttenuationType.NONE;
// 	}
// 	
// 	public PositionedSound(ResourceLocation location, SoundCategory category, float volume, float pitch, BlockPos pos) {
// 		this(location, category, volume, pitch);
// 		this.xPosF = pos.getX();
// 		this.yPosF = pos.getY();
// 		this.zPosF = pos.getZ();
// 		this.attenuationType = AttenuationType.LINEAR;
// 	}
// 	
// }
// 
// Path: src/main/java/team/creative/enhancedvisuals/client/sound/TickedSound.java
// public class TickedSound extends PositionedSound implements ITickableSound {
// 	
// 	public int tick = 0;
// 	public DecimalCurve volumeGraph;
// 	
// 	public TickedSound(ResourceLocation location, SoundCategory category, float pitch, DecimalCurve volumeGraph) {
// 		super(location, category, (float) volumeGraph.valueAt(0), pitch);
// 		this.volumeGraph = volumeGraph;
// 		this.repeat = true;
// 	}
// 	
// 	public TickedSound(ResourceLocation location, SoundCategory category, float pitch, BlockPos pos, DecimalCurve volumeGraph) {
// 		super(location, category, (float) volumeGraph.valueAt(0), pitch, pos);
// 		this.volumeGraph = volumeGraph;
// 		this.repeat = true;
// 	}
// 	
// 	@Override
// 	public boolean isDonePlaying() {
// 		return volume == 0;
// 	}
// 	
// 	@Override
// 	public void update() {
// 		tick++;
// 		volume = (float) volumeGraph.valueAt(tick);
// 	}
// 	
// }


// Path: src/main/java/team/creative/enhancedvisuals/api/VisualHandler.java
import javax.annotation.Nullable;
import com.creativemd.creativecore.common.config.api.CreativeConfig;
import com.creativemd.creativecore.common.config.api.ICreativeConfig;
import com.creativemd.creativecore.common.config.premade.curve.DecimalCurve;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import team.creative.enhancedvisuals.client.EVClient;
import team.creative.enhancedvisuals.client.sound.PositionedSound;
import team.creative.enhancedvisuals.client.sound.TickedSound;

    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));