// 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/RuneEntityRebirth.java
// public class RuneEntityRebirth extends RuneEntity {
// 	private static final String NO_SPAWN_EGG = Refs.Lang.RUNE+".rebirth.noegg";
// 	/**
// 	 * @param actualPattern
// 	 * @param facing
// 	 * @param dusts
// 	 * @param entity
// 	 */
// 	public RuneEntityRebirth(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) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			//take xp if not negated
// 			if(!negated){
// 				if(player.experienceLevel>=10){
// 					player.addExperienceLevel(-10);
// 				}else{
// 					//kill the rune
// 					this.onPatternBrokenByPlayer(player);
// 					return;
// 				}
// 			}
// 			double x,y,z,offset=0.25;
// 			x=y=z=0;
// 			int dir = face.getAxisDirection()==AxisDirection.NEGATIVE? -1:1;
// 			switch(face.getAxis()){
// 			case X:x=offset*dir;
// 				break;
// 			case Y:y=offset*dir;
// 				break;
// 			case Z:z=offset*dir;
// 				break;
// 			}
// 			entity.setupStar(0xFFFFFF, 0xFFFFFF,1,1,new Vec3d(x, y, z));
// 			entity.setDrawStar(true);
// 		}
// 	}
// 	/* (non-Javadoc)
// 	 * @see com.zpig333.runesofwizardry.api.RuneEntity#update()
// 	 */
// 	@Override
// 	public void update() {
// 		// not much here
// 	}
// 	/* (non-Javadoc)
// 	 * @see com.zpig333.runesofwizardry.api.RuneEntity#handleEntityCollision(net.minecraft.world.World, net.minecraft.util.BlockPos, net.minecraft.block.state.IBlockState, net.minecraft.entity.Entity)
// 	 */
// 	@Override
// 	public boolean handleEntityCollision(World worldIn, BlockPos pos,IBlockState state, Entity entityIn) {
// 		if(!worldIn.isRemote){
// 			if((entityIn instanceof EntityLivingBase) && !(entityIn instanceof EntityPlayer)&&!(entityIn instanceof EntityArmorStand)){
// 				ResourceLocation entID = EntityList.getKey(entityIn);
// 				
// 				//check if a spawn egg exists TODO also config blacklist?
// 				if(EntityList.ENTITY_EGGS.get(entID)!=null){
// 					ItemStack egg = new ItemStack(Items.SPAWN_EGG);
// 					NBTTagCompound entityTag = new NBTTagCompound();
// 					entityTag.setString("id", entID.toString());
// 					egg.setTagInfo("EntityTag", entityTag);
// 					Utils.spawnItemCentered(worldIn, pos, egg);
// 					this.onPatternBroken();//kill the rune
// 					entityIn.setDead();//kill the entity
// 				}else{
// 					worldIn.getClosestPlayer(pos.getX(),pos.getY(),pos.getZ(), 16, false).sendMessage(new TextComponentTranslation(NO_SPAWN_EGG));
// 				}
// 			}
// 		}
// 		return true;
// 	}
// }


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.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.runes.entity.RuneEntityRebirth;
package xilef11.mc.runesofwizardry_classics.runes;


public class RuneRebirth extends ClassicRune {
	@Override
	protected ItemStack[][] setupPattern() throws IOException {
// 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/RuneEntityRebirth.java
// public class RuneEntityRebirth extends RuneEntity {
// 	private static final String NO_SPAWN_EGG = Refs.Lang.RUNE+".rebirth.noegg";
// 	/**
// 	 * @param actualPattern
// 	 * @param facing
// 	 * @param dusts
// 	 * @param entity
// 	 */
// 	public RuneEntityRebirth(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) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			//take xp if not negated
// 			if(!negated){
// 				if(player.experienceLevel>=10){
// 					player.addExperienceLevel(-10);
// 				}else{
// 					//kill the rune
// 					this.onPatternBrokenByPlayer(player);
// 					return;
// 				}
// 			}
// 			double x,y,z,offset=0.25;
// 			x=y=z=0;
// 			int dir = face.getAxisDirection()==AxisDirection.NEGATIVE? -1:1;
// 			switch(face.getAxis()){
// 			case X:x=offset*dir;
// 				break;
// 			case Y:y=offset*dir;
// 				break;
// 			case Z:z=offset*dir;
// 				break;
// 			}
// 			entity.setupStar(0xFFFFFF, 0xFFFFFF,1,1,new Vec3d(x, y, z));
// 			entity.setDrawStar(true);
// 		}
// 	}
// 	/* (non-Javadoc)
// 	 * @see com.zpig333.runesofwizardry.api.RuneEntity#update()
// 	 */
// 	@Override
// 	public void update() {
// 		// not much here
// 	}
// 	/* (non-Javadoc)
// 	 * @see com.zpig333.runesofwizardry.api.RuneEntity#handleEntityCollision(net.minecraft.world.World, net.minecraft.util.BlockPos, net.minecraft.block.state.IBlockState, net.minecraft.entity.Entity)
// 	 */
// 	@Override
// 	public boolean handleEntityCollision(World worldIn, BlockPos pos,IBlockState state, Entity entityIn) {
// 		if(!worldIn.isRemote){
// 			if((entityIn instanceof EntityLivingBase) && !(entityIn instanceof EntityPlayer)&&!(entityIn instanceof EntityArmorStand)){
// 				ResourceLocation entID = EntityList.getKey(entityIn);
// 				
// 				//check if a spawn egg exists TODO also config blacklist?
// 				if(EntityList.ENTITY_EGGS.get(entID)!=null){
// 					ItemStack egg = new ItemStack(Items.SPAWN_EGG);
// 					NBTTagCompound entityTag = new NBTTagCompound();
// 					entityTag.setString("id", entID.toString());
// 					egg.setTagInfo("EntityTag", entityTag);
// 					Utils.spawnItemCentered(worldIn, pos, egg);
// 					this.onPatternBroken();//kill the rune
// 					entityIn.setDead();//kill the entity
// 				}else{
// 					worldIn.getClosestPlayer(pos.getX(),pos.getY(),pos.getZ(), 16, false).sendMessage(new TextComponentTranslation(NO_SPAWN_EGG));
// 				}
// 			}
// 		}
// 		return true;
// 	}
// }


// Path: src/main/java/xilef11/mc/runesofwizardry_classics/runes/RuneRebirth.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.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import xilef11.mc.runesofwizardry_classics.Refs;
import xilef11.mc.runesofwizardry_classics.runes.entity.RuneEntityRebirth;

package xilef11.mc.runesofwizardry_classics.runes;


public class RuneRebirth extends ClassicRune {
	@Override
	protected ItemStack[][] setupPattern() throws IOException {
		return PatternUtils.importFromJson(Refs.PATTERN_PATH+"runerebirth.json");