package com.five35.minecraft.greenthumb;

import cpw.mods.fml.common.Loader;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class Fertilizer extends Item {
	private static final Fertilizer INSTANCE = new Fertilizer();
	private static final String NAME = "fertilizer";

	public static Fertilizer getInstance() {
		return Fertilizer.INSTANCE;
	}

	public Fertilizer() {
		super();

		this.setCreativeTab(CreativeTabs.tabMaterials);
		this.setTextureName(Loader.instance().activeModContainer().getModId() + ":" + Fertilizer.NAME);
		this.setUnlocalizedName(Fertilizer.NAME);
	}

	@Override
	public boolean onItemUse(final ItemStack stack, final EntityPlayer player, final World world, final int x, final int y, final int z, final int side, final float hitX, final float hitY, final float hitZ) {
		if (ItemDye.applyBonemeal(stack, world, x, y, z, player)) {
			if (!world.isRemote) {
				world.playAuxSFX(2005, x, y, z, 0);
			}

			return true;
		}

		return false;
	}
}

@@ -39,43 +39,8 @@
 b;%0A%0A
-import cpw.mods.fml.common.Loader;%0A
 impo
@@ -235,16 +235,90 @@
 mStack;%0A
+import net.minecraft.util.BlockPos;%0Aimport net.minecraft.util.EnumFacing;%0A
 import n
@@ -661,106 +661,8 @@
 s);%0A
-%09%09this.setTextureName(Loader.instance().activeModContainer().getModId() + %22:%22 + Fertilizer.NAME);%0A
 %09%09th
@@ -821,55 +821,50 @@
 nal 
-int x, final int y, final int z, final int side
+BlockPos position, final EnumFacing facing
 , fi
@@ -959,23 +959,24 @@
  world, 
-x, y, z
+position
 , player
@@ -1037,15 +1037,16 @@
 05, 
-x, y, z
+position
 , 0)

update fertilizer item for 1.8