package com.lothrazar.cyclicmagic.util;

import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class UtilSound {
//REF BROKEN http://www.minecraftforge.net/forum/index.php?topic=37547.0
	public static final float		volume				= 1.0F;
	public static final float		pitch					= 1.0F;
	public static final boolean	distanceDelay	= false;

	public static void playSoundPlaceBlock(EntityPlayer player,BlockPos pos, Block block) {
		BlockPos here = (pos == null) ? player.getPosition() : pos;
		
		if(block != null && block.getStepSound() != null){
			playSound(player ,here,block.getStepSound().getPlaceSound(),SoundCategory.BLOCKS);
		}
	}
	public static void playSound(EntityPlayer player, BlockPos pos,SoundEvent thunk) {
		BlockPos here = (pos == null) ? player.getPosition() : pos;
		playSound(player,here,thunk,player.getSoundCategory());
	}

	public static void playSound(EntityPlayer player,BlockPos pos, SoundEvent soundIn, SoundCategory cat) {
		BlockPos here = (pos == null) ? player.getPosition() : pos;
		
		System.out.println("playSound "+soundIn.toString());
		
		player.worldObj.playSound(player, here, soundIn, cat, volume, pitch);
	}
	
	
	
	
	
	public static void playSound(World worldObj, BlockPos pos, SoundEvent soundIn, SoundCategory category) {

		worldObj.playSound(pos.getX(),pos.getY(),pos.getZ(), soundIn, category, volume, pitch, distanceDelay);
	
	}

}

@@ -453,17 +453,16 @@
 itch%09%09%09%09
-%09
 = 1.0F;%0A
@@ -1195,66 +1195,9 @@
 ;%0A%09%09
-%0A%09%09System.out.println(%22playSound %22+soundIn.toString());%0A%09%09
+ 
 %0A%09%09p
@@ -1269,24 +1269,17 @@
 h);%0A%09%7D%0A%09
-%0A%09%0A%09%0A%09%0A%09
+ 
 %0A%09public
@@ -1377,17 +1377,16 @@
 gory) %7B%0A
-%0A
 %09%09worldO
@@ -1486,12 +1486,9 @@
 y);%0A
-%09%0A
 %09%7D%0A
-%0A
 %7D%0A

remove logspam from UtilSound