// 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/runes/entity/RuneEntityEnchantingSilktouch.java
// public class RuneEntityEnchantingSilktouch extends RuneEntity {
// 	public RuneEntityEnchantingSilktouch(ItemStack[][] actualPattern,
// 			EnumFacing facing, Set<BlockPos> dusts,
// 			TileEntityDustActive entity, IRune creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			if(negated || Utils.takeXP(player, 10)){
// 				//find the bow stack
// 				ItemStack toEnchant=ItemStack.EMPTY;
// 				if(sacrifice!=null){
// 					for(ItemStack i:sacrifice){
// 						if(i.getItem()==Items.DIAMOND_PICKAXE || i.getItem()==Items.DIAMOND_SHOVEL){
// 							toEnchant=i;
// 						}
// 					}
// 				}
// 				if(toEnchant.isEmpty() && negated)toEnchant=new ItemStack(Items.DIAMOND_PICKAXE);
// 				toEnchant.addEnchantment(Enchantments.SILK_TOUCH, Enchantments.SILK_TOUCH.getMaxLevel());
// 				toEnchant.setItemDamage(0);
// 				Utils.spawnItemCentered(world, getPos(), toEnchant);
// 				this.onPatternBroken();
// 			}else{
// 				this.onPatternBrokenByPlayer(player);
// 			}
// 		}
// 	}
// 	@Override
// 	public void update() {
// 		//not much until FX
// 	}
// }


import java.io.IOException;
import java.util.Set;
import com.zpig333.runesofwizardry.api.RuneEntity;
import com.zpig333.runesofwizardry.core.rune.PatternUtils;
import com.zpig333.runesofwizardry.tileentity.TileEntityDustActive;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.oredict.OreDictionary;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.runes.entity.RuneEntityEnchantingSilktouch;
	@Override
	public String getID() {
		return "runeEnchantingSilkTouch";
	}
	@Override
	protected Vec3i setupEntityPos() {
		return new Vec3i(1,1,0);
	}
	@Override
	protected ItemStack[][] setupSacrifice() {
		return new ItemStack[][]{
				{new ItemStack(Blocks.GOLD_BLOCK),new ItemStack(Items.DIAMOND_PICKAXE,1,OreDictionary.WILDCARD_VALUE)},
				{new ItemStack(Blocks.GOLD_BLOCK),new ItemStack(Items.DIAMOND_SHOVEL,1,OreDictionary.WILDCARD_VALUE)}
				//take 10 XP
				};
	}
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.runes.ClassicRune#hasExtraSacrifice()
	 */
	@Override
	protected boolean hasExtraSacrifice() {
		return true;
	}
	@Override
	public String getName() {
		return Refs.Lang.RUNE+".enchantingsilktouch";
	}
	@Override
	public RuneEntity createRune(ItemStack[][] actualPattern, EnumFacing front,
			Set<BlockPos> dusts, TileEntityDustActive entity) {
// 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/runes/entity/RuneEntityEnchantingSilktouch.java
// public class RuneEntityEnchantingSilktouch extends RuneEntity {
// 	public RuneEntityEnchantingSilktouch(ItemStack[][] actualPattern,
// 			EnumFacing facing, Set<BlockPos> dusts,
// 			TileEntityDustActive entity, IRune creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			if(negated || Utils.takeXP(player, 10)){
// 				//find the bow stack
// 				ItemStack toEnchant=ItemStack.EMPTY;
// 				if(sacrifice!=null){
// 					for(ItemStack i:sacrifice){
// 						if(i.getItem()==Items.DIAMOND_PICKAXE || i.getItem()==Items.DIAMOND_SHOVEL){
// 							toEnchant=i;
// 						}
// 					}
// 				}
// 				if(toEnchant.isEmpty() && negated)toEnchant=new ItemStack(Items.DIAMOND_PICKAXE);
// 				toEnchant.addEnchantment(Enchantments.SILK_TOUCH, Enchantments.SILK_TOUCH.getMaxLevel());
// 				toEnchant.setItemDamage(0);
// 				Utils.spawnItemCentered(world, getPos(), toEnchant);
// 				this.onPatternBroken();
// 			}else{
// 				this.onPatternBrokenByPlayer(player);
// 			}
// 		}
// 	}
// 	@Override
// 	public void update() {
// 		//not much until FX
// 	}
// }


// Path: src/main/java/xilef11/mc/runesofwizardry_classics/runes/RuneEnchantingSilkTouch.java
import java.io.IOException;
import java.util.Set;
import com.zpig333.runesofwizardry.api.RuneEntity;
import com.zpig333.runesofwizardry.core.rune.PatternUtils;
import com.zpig333.runesofwizardry.tileentity.TileEntityDustActive;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.oredict.OreDictionary;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.runes.entity.RuneEntityEnchantingSilktouch;

	@Override
	public String getID() {
		return "runeEnchantingSilkTouch";
	}
	@Override
	protected Vec3i setupEntityPos() {
		return new Vec3i(1,1,0);
	}
	@Override
	protected ItemStack[][] setupSacrifice() {
		return new ItemStack[][]{
				{new ItemStack(Blocks.GOLD_BLOCK),new ItemStack(Items.DIAMOND_PICKAXE,1,OreDictionary.WILDCARD_VALUE)},
				{new ItemStack(Blocks.GOLD_BLOCK),new ItemStack(Items.DIAMOND_SHOVEL,1,OreDictionary.WILDCARD_VALUE)}
				//take 10 XP
				};
	}
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.runes.ClassicRune#hasExtraSacrifice()
	 */
	@Override
	protected boolean hasExtraSacrifice() {
		return true;
	}
	@Override
	public String getName() {
		return Refs.Lang.RUNE+".enchantingsilktouch";
	}
	@Override
	public RuneEntity createRune(ItemStack[][] actualPattern, EnumFacing front,
			Set<BlockPos> dusts, TileEntityDustActive entity) {
		return new RuneEntityEnchantingSilktouch(actualPattern, front, dusts, entity, this);