// 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/RuneEntityFarm.java
// public class RuneEntityFarm extends RuneEntity {
// 	public RuneEntityFarm(ItemStack[][] actualPattern, EnumFacing facing,
// 			Set<BlockPos> dusts, TileEntityDustActive entity, RuneFarm creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@SuppressWarnings("deprecation")//for crop.getStateFromMeta
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			Coords c = ((RuneFarm)creator).getVariableDusts().iterator().next();
// 			int rad, cropBase, cropRand;
// 			switch(EnumDustTypes.getByMeta(placedPattern[c.row][c.col].getMetadata())){
// 			case PLANT:rad=1;cropBase=0;cropRand=2;
// 				break;
// 			case GUNPOWDER:rad=2;cropBase=1;cropRand=3;
// 				break;
// 			case LAPIS:rad=3;cropBase=3;cropRand=3;
// 				break;
// 			case BLAZE:rad=4;cropBase=4;cropRand=5;
// 				break;
// 			default:this.onPatternBroken();return;
// 			}
// 			//crops (XXX replace with config stuff...)
// 			Random rand = new Random();
// 			Block crop=Blocks.WHEAT;
// 			switch(rand.nextInt(4)){
// 			case 0: crop = Blocks.WHEAT;break;
// 			case 1: crop = Blocks.CARROTS;break;
// 			case 2: crop = Blocks.POTATOES;break;
// 			case 3: crop = Blocks.BEETROOTS;break;
// 			}
// 			this.onPatternBroken();//deactivate the rune before replacing the blocks to avoid errors
// 			//replace with farmland and crops
// 			for(int i=-rad;i<=rad;i++){
// 				for(int j=-rad;j<=rad;j++){
// 					if(i!=0||j!=0){
// 						BlockPos current = getPos().down().east(i).south(j);
// 						Block block = world.getBlockState(current).getBlock();
// 						if(Config.farmReplaceable.contains(block.getRegistryName().toString())){
// 							world.setBlockState(current, Blocks.FARMLAND.getDefaultState());
// 							int meta = cropBase + rand.nextInt(cropRand);
// 							if(meta>7)meta=7;//XXX replace with something like AGE.max value
// 							world.setBlockState(current.up(), crop.getStateFromMeta(meta));
// 						}
// 					}
// 				}
// 			}
// 			//replace with water
// 			if(Config.farmReplaceable.contains(world.getBlockState(getPos().down()).getBlock().getRegistryName().toString()))world.setBlockState(getPos().down(), Blocks.WATER.getDefaultState());
// 			world.setBlockToAir(getPos());
// 		}
// 	}
// 	@Override
// 	public void update() {
// 	}
// }


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.RuneEntityFarm;
package xilef11.mc.runesofwizardry_classics.runes;


public class RuneFarm extends VariableRune {
	@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/RuneEntityFarm.java
// public class RuneEntityFarm extends RuneEntity {
// 	public RuneEntityFarm(ItemStack[][] actualPattern, EnumFacing facing,
// 			Set<BlockPos> dusts, TileEntityDustActive entity, RuneFarm creator) {
// 		super(actualPattern, facing, dusts, entity, creator);
// 	}
// 	@SuppressWarnings("deprecation")//for crop.getStateFromMeta
// 	@Override
// 	public void onRuneActivatedbyPlayer(EntityPlayer player,
// 			ItemStack[] sacrifice, boolean negated) {
// 		World world = player.world;
// 		if(!world.isRemote){
// 			Coords c = ((RuneFarm)creator).getVariableDusts().iterator().next();
// 			int rad, cropBase, cropRand;
// 			switch(EnumDustTypes.getByMeta(placedPattern[c.row][c.col].getMetadata())){
// 			case PLANT:rad=1;cropBase=0;cropRand=2;
// 				break;
// 			case GUNPOWDER:rad=2;cropBase=1;cropRand=3;
// 				break;
// 			case LAPIS:rad=3;cropBase=3;cropRand=3;
// 				break;
// 			case BLAZE:rad=4;cropBase=4;cropRand=5;
// 				break;
// 			default:this.onPatternBroken();return;
// 			}
// 			//crops (XXX replace with config stuff...)
// 			Random rand = new Random();
// 			Block crop=Blocks.WHEAT;
// 			switch(rand.nextInt(4)){
// 			case 0: crop = Blocks.WHEAT;break;
// 			case 1: crop = Blocks.CARROTS;break;
// 			case 2: crop = Blocks.POTATOES;break;
// 			case 3: crop = Blocks.BEETROOTS;break;
// 			}
// 			this.onPatternBroken();//deactivate the rune before replacing the blocks to avoid errors
// 			//replace with farmland and crops
// 			for(int i=-rad;i<=rad;i++){
// 				for(int j=-rad;j<=rad;j++){
// 					if(i!=0||j!=0){
// 						BlockPos current = getPos().down().east(i).south(j);
// 						Block block = world.getBlockState(current).getBlock();
// 						if(Config.farmReplaceable.contains(block.getRegistryName().toString())){
// 							world.setBlockState(current, Blocks.FARMLAND.getDefaultState());
// 							int meta = cropBase + rand.nextInt(cropRand);
// 							if(meta>7)meta=7;//XXX replace with something like AGE.max value
// 							world.setBlockState(current.up(), crop.getStateFromMeta(meta));
// 						}
// 					}
// 				}
// 			}
// 			//replace with water
// 			if(Config.farmReplaceable.contains(world.getBlockState(getPos().down()).getBlock().getRegistryName().toString()))world.setBlockState(getPos().down(), Blocks.WATER.getDefaultState());
// 			world.setBlockToAir(getPos());
// 		}
// 	}
// 	@Override
// 	public void update() {
// 	}
// }


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

package xilef11.mc.runesofwizardry_classics.runes;


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