package com.tehbeard.enchancedadv.items;

import net.minecraft.item.Item;

public class ItemLocationEncoder extends Item{

	public ItemLocationEncoder(int par1) {
		super(par1);
		setUnlocalizedName("locationencoder");
		// TODO Auto-generated constructor stub
	}
	
	

}

@@ -60,212 +60,1570 @@
 aft.
-item.Item;%0A%0Apublic class ItemLocationEncoder extends Item%7B%0A%0A%09public ItemLocationEncoder(int par1) %7B%0A%09%09super(par1);%0A%09%09setUnlocalizedName(%22locationencoder%22);%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%09%0A%09
+entity.player.EntityPlayer;%0Aimport net.minecraft.item.Item;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.nbt.NBTTagCompound;%0Aimport net.minecraft.world.World;%0Aimport net.minecraftforge.common.ForgeDirection;%0A%0A/**%0A * Encodes location information to apply to a command block%0A * @author James%0A *%0A */%0Apublic class ItemLocationEncoder extends Item%7B%0A%0A%09public ItemLocationEncoder(int par1) %7B%0A%09%09super(par1);%0A%09%09setUnlocalizedName(%22locationencoder%22);%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%09%0A%09@Override%0A%09public void onCreated(ItemStack par1ItemStack, World par2World,%0A%09%09%09EntityPlayer par3EntityPlayer) %7B%0A%09%09initTag(par1ItemStack);%0A%09%09super.onCreated(par1ItemStack, par2World, par3EntityPlayer);%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean onItemUseFirst(ItemStack stack, EntityPlayer player,%0A%09%09%09World world, int x, int y, int z, int side, float hitX, float hitY,%0A%09%09%09float hitZ) %7B%0A%09%09initTag(stack);%0A%09%09if(player.isSneaking())%7B%0A%09%09%09ForgeDirection direction = ForgeDirection.getOrientation(side);%0A%09%09%7D%0A%09%09return true;%0A%09%7D%0A%09%0A%09public NBTTagCompound getLocTag(ItemStack stack)%7B%0A%09%09return stack.stackTagCompound.getCompoundTag(%22loc%22);%0A%09%7D%0A%09%0A%09public void initTag(ItemStack stack)%7B%0A%09%09if(stack.stackTagCompound==null)%7B%0A%09        stack.stackTagCompound = new NBTTagCompound();%0A%09        stack.stackTagCompound.setCompoundTag(%22loc%22, new NBTTagCompound());%0A%09        stack.stackTagCompound.getCompoundTag(%22loc%22).setInteger(%22x%22,0);%0A%09        stack.stackTagCompound.getCompoundTag(%22loc%22).setInteger(%22y%22,0);%0A%09        stack.stackTagCompound.getCompoundTag(%22loc%22).setInteger(%22z%22,0);%0A%09        %7D%0A%09%7D
 %0A%0A%7D%0A

work on getting location, either the block we click or relative to side we clicked.