// Path: src/main/java/xilef11/mc/runesofwizardry_classics/Refs.java
// public final class Refs {
// 	private Refs(){}
// 	public static final String MODID = "runesofwizardry_classics";
// 	public static final String VERSION = "@VERSION@";
// 	public static final String NAME="Runes of Wizardry - Classic Dusts Pack";
// 	public static final String GUI_FACTORY="xilef11.mc.runesofwizardry_classics.client.gui.GuiFactory";
// 	public static final String CLIENT_PROXY = "xilef11.mc.runesofwizardry_classics.proxy.ClientProxy",
// 							   SERVER_PROXY="xilef11.mc.runesofwizardry_classics.proxy.ServerProxy";
// 	public static final String PATTERN_PATH=MODID+":patterns/";
// 	public static final String TEXTURE_PATH=MODID+":";
// 	public static final int TICKS_PER_DAY=24000;
// 	public static final int TPS=20;
// 	public static final class Lang{
// 		private Lang(){}
// 		public static final String RUNE=MODID+".rune";
// 		public static final String CONFIG=MODID+".configuration";
// 		public static final String DEC=RUNE+".decorative";
// 		
// 		public static final class Jei{
// 			private Jei(){}
// 			public static final String JEI=MODID+".jei";
// 			public static final String SPIRIT_SWORD=JEI+".spirit_sword";
// 			public static final String SPIRIT_PICKAXE=JEI+".spirit_pickaxe";
// 		}
// 	}
// }
// 
// Path: src/main/java/xilef11/mc/runesofwizardry_classics/utils/Utils.java
// public class Utils {
// 	private Utils(){}
// 	public static void spawnItemCentered(World world, BlockPos pos, ItemStack stack){
// 		EntityItem item = new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack);
// 		item.setDefaultPickupDelay();
// 		world.spawnEntity(item);
// 	}
// 	/**
// 	 * Attempts to remove experience levels from the player.
// 	 * @param player the player from which to take XP
// 	 * @param levels the number of XP levels to take
// 	 * @return true if the levels have been removed, false if the player didn't have enough
// 	 */
// 	public static boolean takeXP(EntityPlayer player, int levels){
// 		if(player.capabilities.isCreativeMode)return true;
// 		boolean enough =player.experienceLevel>=levels;
// 		if(enough){
// 			player.addExperienceLevel(-levels);
// 		}
// 		return enough;
// 	}
// 	/** stores coordinates for an array or whatever**/
// 	public static class Coords{
// 		public final int row,col;
// 		public Coords(int r, int c) {
// 			this.row = r;
// 			this.col = c;
// 		}
// 		/* (non-Javadoc)
// 		 * @see java.lang.Object#hashCode()
// 		 */
// 		@Override
// 		public int hashCode() {
// 			return row+col;//not the best, but should be sufficient
// 		}
// 		/* (non-Javadoc)
// 		 * @see java.lang.Object#equals(java.lang.Object)
// 		 */
// 		@Override
// 		public boolean equals(Object obj) {
// 			if(obj==this)return true;
// 			if(!(obj instanceof Coords))return false;
// 			Coords o = (Coords)obj;
// 			return this.row==o.row && this.col==o.col;
// 		}
// 	}
// }


import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import com.zpig333.runesofwizardry.api.IRune;
import com.zpig333.runesofwizardry.api.RuneEntity;
import com.zpig333.runesofwizardry.tileentity.TileEntityDustActive;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemRecord;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.utils.Utils;
/**
 *
 */
package xilef11.mc.runesofwizardry_classics.runes.entity;


/**
 * @author Xilef11
 *
 */
public class RuneEntityMusic extends RuneEntity {
	/**
	 * @param actualPattern
	 * @param facing
	 * @param dusts
	 * @param entity
	 */
	public RuneEntityMusic(ItemStack[][] actualPattern, EnumFacing facing,
			Set<BlockPos> dusts, TileEntityDustActive entity,IRune creator) {
		super(actualPattern, facing, dusts, entity,creator);
	}
	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.RuneEntity#onRuneActivatedbyPlayer(net.minecraft.entity.player.EntityPlayer, net.minecraft.item.ItemStack[], boolean)
	 */
	@Override
	public void onRuneActivatedbyPlayer(EntityPlayer player,ItemStack[] sacrifice, boolean negated) {
	}
	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.RuneEntity#update()
	 */
	@Override
	public void update() {
		World world = entity.getWorld();
// Path: src/main/java/xilef11/mc/runesofwizardry_classics/Refs.java
// public final class Refs {
// 	private Refs(){}
// 	public static final String MODID = "runesofwizardry_classics";
// 	public static final String VERSION = "@VERSION@";
// 	public static final String NAME="Runes of Wizardry - Classic Dusts Pack";
// 	public static final String GUI_FACTORY="xilef11.mc.runesofwizardry_classics.client.gui.GuiFactory";
// 	public static final String CLIENT_PROXY = "xilef11.mc.runesofwizardry_classics.proxy.ClientProxy",
// 							   SERVER_PROXY="xilef11.mc.runesofwizardry_classics.proxy.ServerProxy";
// 	public static final String PATTERN_PATH=MODID+":patterns/";
// 	public static final String TEXTURE_PATH=MODID+":";
// 	public static final int TICKS_PER_DAY=24000;
// 	public static final int TPS=20;
// 	public static final class Lang{
// 		private Lang(){}
// 		public static final String RUNE=MODID+".rune";
// 		public static final String CONFIG=MODID+".configuration";
// 		public static final String DEC=RUNE+".decorative";
// 		
// 		public static final class Jei{
// 			private Jei(){}
// 			public static final String JEI=MODID+".jei";
// 			public static final String SPIRIT_SWORD=JEI+".spirit_sword";
// 			public static final String SPIRIT_PICKAXE=JEI+".spirit_pickaxe";
// 		}
// 	}
// }
// 
// Path: src/main/java/xilef11/mc/runesofwizardry_classics/utils/Utils.java
// public class Utils {
// 	private Utils(){}
// 	public static void spawnItemCentered(World world, BlockPos pos, ItemStack stack){
// 		EntityItem item = new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack);
// 		item.setDefaultPickupDelay();
// 		world.spawnEntity(item);
// 	}
// 	/**
// 	 * Attempts to remove experience levels from the player.
// 	 * @param player the player from which to take XP
// 	 * @param levels the number of XP levels to take
// 	 * @return true if the levels have been removed, false if the player didn't have enough
// 	 */
// 	public static boolean takeXP(EntityPlayer player, int levels){
// 		if(player.capabilities.isCreativeMode)return true;
// 		boolean enough =player.experienceLevel>=levels;
// 		if(enough){
// 			player.addExperienceLevel(-levels);
// 		}
// 		return enough;
// 	}
// 	/** stores coordinates for an array or whatever**/
// 	public static class Coords{
// 		public final int row,col;
// 		public Coords(int r, int c) {
// 			this.row = r;
// 			this.col = c;
// 		}
// 		/* (non-Javadoc)
// 		 * @see java.lang.Object#hashCode()
// 		 */
// 		@Override
// 		public int hashCode() {
// 			return row+col;//not the best, but should be sufficient
// 		}
// 		/* (non-Javadoc)
// 		 * @see java.lang.Object#equals(java.lang.Object)
// 		 */
// 		@Override
// 		public boolean equals(Object obj) {
// 			if(obj==this)return true;
// 			if(!(obj instanceof Coords))return false;
// 			Coords o = (Coords)obj;
// 			return this.row==o.row && this.col==o.col;
// 		}
// 	}
// }


// Path: src/main/java/xilef11/mc/runesofwizardry_classics/runes/entity/RuneEntityMusic.java
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import com.zpig333.runesofwizardry.api.IRune;
import com.zpig333.runesofwizardry.api.RuneEntity;
import com.zpig333.runesofwizardry.tileentity.TileEntityDustActive;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemRecord;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.utils.Utils;

/**
 *
 */
package xilef11.mc.runesofwizardry_classics.runes.entity;


/**
 * @author Xilef11
 *
 */
public class RuneEntityMusic extends RuneEntity {
	/**
	 * @param actualPattern
	 * @param facing
	 * @param dusts
	 * @param entity
	 */
	public RuneEntityMusic(ItemStack[][] actualPattern, EnumFacing facing,
			Set<BlockPos> dusts, TileEntityDustActive entity,IRune creator) {
		super(actualPattern, facing, dusts, entity,creator);
	}
	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.RuneEntity#onRuneActivatedbyPlayer(net.minecraft.entity.player.EntityPlayer, net.minecraft.item.ItemStack[], boolean)
	 */
	@Override
	public void onRuneActivatedbyPlayer(EntityPlayer player,ItemStack[] sacrifice, boolean negated) {
	}
	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.RuneEntity#update()
	 */
	@Override
	public void update() {
		World world = entity.getWorld();
		if(!world.isRemote && entity.ticksExisted()==Refs.TPS*5){