// 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.io.IOException;
import com.zpig333.runesofwizardry.core.rune.PatternUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.utils.Utils;
package xilef11.mc.runesofwizardry_classics.inscriptions;




public class InscriptionBlinkII extends ClassicInscription {
	//also has a particle effect at the teleport destination
	@Override
	protected ItemStack[][] setupPattern() throws IOException {
		return PatternUtils.importFromJson(new ResourceLocation(Refs.MODID,"patterns/inscriptions/inscriptionblinkii.json"));
	}

	@Override
	protected ItemStack[] setupChargeItems() {
		return new ItemStack[]{
				new ItemStack(Blocks.QUARTZ_BLOCK),
				new ItemStack(Items.BLAZE_ROD,2),
				new ItemStack(Items.ENDER_PEARL,16),
				new ItemStack(Blocks.OBSIDIAN,4),
				new ItemStack(Blocks.END_STONE,8)
		};//10 xp
	}
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.inscriptions.ClassicInscription#hasExtraSacrifice()
	 */
	@Override
	protected boolean hasExtraSacrifice() {
		return true;
	}

	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.Inscription#onInscriptionCharged(net.minecraft.entity.player.EntityPlayer, net.minecraft.item.ItemStack[], boolean)
	 */
	@Override
	public boolean onInscriptionCharged(EntityPlayer player,ItemStack[] sacrifice, boolean negated) {
		if(!player.world.isRemote){
			if(!negated){
// 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/inscriptions/InscriptionBlinkII.java
import java.io.IOException;
import com.zpig333.runesofwizardry.core.rune.PatternUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.utils.Utils;

package xilef11.mc.runesofwizardry_classics.inscriptions;




public class InscriptionBlinkII extends ClassicInscription {
	//also has a particle effect at the teleport destination
	@Override
	protected ItemStack[][] setupPattern() throws IOException {
		return PatternUtils.importFromJson(new ResourceLocation(Refs.MODID,"patterns/inscriptions/inscriptionblinkii.json"));
	}

	@Override
	protected ItemStack[] setupChargeItems() {
		return new ItemStack[]{
				new ItemStack(Blocks.QUARTZ_BLOCK),
				new ItemStack(Items.BLAZE_ROD,2),
				new ItemStack(Items.ENDER_PEARL,16),
				new ItemStack(Blocks.OBSIDIAN,4),
				new ItemStack(Blocks.END_STONE,8)
		};//10 xp
	}
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.inscriptions.ClassicInscription#hasExtraSacrifice()
	 */
	@Override
	protected boolean hasExtraSacrifice() {
		return true;
	}

	/* (non-Javadoc)
	 * @see com.zpig333.runesofwizardry.api.Inscription#onInscriptionCharged(net.minecraft.entity.player.EntityPlayer, net.minecraft.item.ItemStack[], boolean)
	 */
	@Override
	public boolean onInscriptionCharged(EntityPlayer player,ItemStack[] sacrifice, boolean negated) {
		if(!player.world.isRemote){
			if(!negated){
				return Utils.takeXP(player, 20);