// 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/RuneEntityHealing.java
// public class RuneEntityHealing extends RuneEntity {
// 	public RuneEntityHealing(ItemStack[][] actualPattern, EnumFacing facing,
// 			Set<BlockPos> dusts, TileEntityDustActive entity, RuneHealing creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		System.out.println("WTF");
// 		if(!world.isRemote){
// 			if(!(negated || Utils.takeXP(player, 2))){
// 				this.onPatternBrokenByPlayer(player);
// 				return;
// 			}
// 			Coords var = ((RuneHealing)creator).getVariableDusts().iterator().next();
// 			int duration,power,food;
// 			float sat;
// 			switch(EnumDustTypes.getByMeta(placedPattern[var.row][var.col].getMetadata())){
// 			case PLANT: duration=4;power=1;food=0;sat=0;//gives regen 1
// 				break;
// 			case GUNPOWDER: duration=5;power=2;food=0;sat=0;//gives regen 2
// 				break;
// 			case LAPIS: duration=10;power=2;food=5;sat=0.6F;
// 				break;
// 			case BLAZE: duration=32;power=4;food=8;sat=0.8F;//gives regen 4 (regen 5 just gives regen 1)
// 				break;
// 			default: duration=power=0;food=0;sat=0;
// 				break;
// 			}
// 			List<EntityLivingBase> ents = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(getPos().add(-3, -1, -3), getPos().add(3,1,3)));
// 			for(EntityLivingBase e:ents){
// 				e.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, duration*20, power-1));
// 				if(e instanceof EntityPlayer){
// 					EntityPlayer p = (EntityPlayer)e;
// 					p.getFoodStats().addStats(food, sat);
// 				}
// 			}
// 		}
// 	}
// 	@Override
// 	public void update() {
// 			if(entity.ticksExisted()>=100){
// 				this.onPatternBroken();
// 			}
// 	}
// }


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.ResourceLocation;
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.RuneEntityHealing;
/**
 *
 */
package xilef11.mc.runesofwizardry_classics.runes;


/**
 * @author Xilef11
 *
 */
public class RuneHealing extends VariableRune {
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.runes.ClassicRune#setupPattern()
	 */
	@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/RuneEntityHealing.java
// public class RuneEntityHealing extends RuneEntity {
// 	public RuneEntityHealing(ItemStack[][] actualPattern, EnumFacing facing,
// 			Set<BlockPos> dusts, TileEntityDustActive entity, RuneHealing creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		System.out.println("WTF");
// 		if(!world.isRemote){
// 			if(!(negated || Utils.takeXP(player, 2))){
// 				this.onPatternBrokenByPlayer(player);
// 				return;
// 			}
// 			Coords var = ((RuneHealing)creator).getVariableDusts().iterator().next();
// 			int duration,power,food;
// 			float sat;
// 			switch(EnumDustTypes.getByMeta(placedPattern[var.row][var.col].getMetadata())){
// 			case PLANT: duration=4;power=1;food=0;sat=0;//gives regen 1
// 				break;
// 			case GUNPOWDER: duration=5;power=2;food=0;sat=0;//gives regen 2
// 				break;
// 			case LAPIS: duration=10;power=2;food=5;sat=0.6F;
// 				break;
// 			case BLAZE: duration=32;power=4;food=8;sat=0.8F;//gives regen 4 (regen 5 just gives regen 1)
// 				break;
// 			default: duration=power=0;food=0;sat=0;
// 				break;
// 			}
// 			List<EntityLivingBase> ents = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(getPos().add(-3, -1, -3), getPos().add(3,1,3)));
// 			for(EntityLivingBase e:ents){
// 				e.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, duration*20, power-1));
// 				if(e instanceof EntityPlayer){
// 					EntityPlayer p = (EntityPlayer)e;
// 					p.getFoodStats().addStats(food, sat);
// 				}
// 			}
// 		}
// 	}
// 	@Override
// 	public void update() {
// 			if(entity.ticksExisted()>=100){
// 				this.onPatternBroken();
// 			}
// 	}
// }


// Path: src/main/java/xilef11/mc/runesofwizardry_classics/runes/RuneHealing.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.ResourceLocation;
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.RuneEntityHealing;

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


/**
 * @author Xilef11
 *
 */
public class RuneHealing extends VariableRune {
	/* (non-Javadoc)
	 * @see xilef11.mc.runesofwizardry_classics.runes.ClassicRune#setupPattern()
	 */
	@Override
	protected ItemStack[][] setupPattern() throws IOException {
		return PatternUtils.importFromJson(new ResourceLocation(Refs.PATTERN_PATH+"runehealing.json"));