package net.silentchaos512.gems.item;

import java.util.List;

import com.google.common.collect.Lists;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.silentchaos512.gems.SilentGems;
import net.silentchaos512.gems.block.ModBlocks;
import net.silentchaos512.gems.lib.Names;
import net.silentchaos512.lib.registry.IRegistryObject;

public class ItemFluffyPuffSeeds extends ItemSeeds implements IRegistryObject {

  public ItemFluffyPuffSeeds() {

    super(ModBlocks.fluffyPuffPlant, Blocks.FARMLAND);
    setUnlocalizedName(Names.FLUFFY_PUFF_SEEDS);
    MinecraftForge.addGrassSeed(new ItemStack(this), 2);
  }

  @Override
  public String getUnlocalizedName(ItemStack stack) {

    return "item.silentgems:" + Names.FLUFFY_PUFF_SEEDS;
  }

  @Override
  public void addRecipes() {

  }

  @Override
  public void addOreDict() {

  }

  @Override
  public String getName() {

    return Names.FLUFFY_PUFF_SEEDS;
  }

  @Override
  public String getFullName() {

    return getModId() + ":" + getName();
  }

  @Override
  public String getModId() {

    return SilentGems.MOD_ID.toLowerCase();
  }

  @Override
  public List<ModelResourceLocation> getVariants() {

    return Lists.newArrayList(new ModelResourceLocation(getFullName(), "inventory"));
  }

  @Override
  public boolean registerModels() {

    return false;
  }
}

@@ -97,16 +97,62 @@
 Lists;%0A%0A
+import net.minecraft.block.state.IBlockState;%0A
 import n
@@ -215,16 +215,65 @@
 cation;%0A
+import net.minecraft.entity.player.EntityPlayer;%0A
 import n
@@ -372,16 +372,250 @@
 mStack;%0A
+import net.minecraft.util.EnumActionResult;%0Aimport net.minecraft.util.EnumFacing;%0Aimport net.minecraft.util.EnumHand;%0Aimport net.minecraft.util.math.BlockPos;%0Aimport net.minecraft.world.IBlockAccess;%0Aimport net.minecraft.world.World;%0A
 import n
@@ -1118,32 +1118,943 @@
 this), 2);%0A  %7D%0A%0A
+  @Override%0A  public IBlockState getPlant(IBlockAccess world, BlockPos pos) %7B%0A%0A    return ModBlocks.fluffyPuffPlant.getDefaultState();%0A  %7D%0A%0A  @Override%0A  public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn,%0A      BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) %7B%0A%0A    // Identical to ItemSeeds.onItemUse, except using getPlant instead of this.crops, which%0A    // does not work.%0A    IBlockState state = worldIn.getBlockState(pos);%0A    if (facing == EnumFacing.UP && playerIn.canPlayerEdit(pos.offset(facing), facing, stack)%0A        && state.getBlock().canSustainPlant(state, worldIn, pos, EnumFacing.UP, this)%0A        && worldIn.isAirBlock(pos.up())) %7B%0A      worldIn.setBlockState(pos.up(), getPlant(worldIn, pos));%0A      --stack.stackSize;%0A      return EnumActionResult.SUCCESS;%0A    %7D else %7B%0A      return EnumActionResult.FAIL;%0A    %7D%0A  %7D%0A%0A
   @Override%0A  pu

Fix fluffy puff seeds crash (closes #58)