Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.6.4] Crop problems


Recommended Posts

Hi there!

I have a problem with my crop droppings.

It should drop 1 seed and 1 enderpearl, but instead it drops 1 enderpearl and 0-4 seeds.

I would also know how to make them plantable on many surfaces, and how to make it ungrowable by bonemeal.


Any help would be greatly appreciated!


Main Class:

package net.be.mods;

import net.be.mods.block.FragmentOre;
import net.be.mods.block.blockCraftingTable;
import net.be.mods.block.blockEmeraldOre;
import net.be.mods.block.blockRubyOre;
import net.be.mods.block.blockSapphireOre;
import net.be.mods.block.cropEnder;
import net.be.mods.entity.EntityZomburt;
import net.be.mods.entity.RenderZomburt;
import net.be.mods.gui.GuiHandler;
import net.be.mods.item.ItemAxeInfinite;
import net.be.mods.item.ItemBasic;
import net.be.mods.item.ItemGlowing;
import net.be.mods.item.ItemHoeInfinite;
import net.be.mods.item.ItemPickaxeInfinite;
import net.be.mods.item.ItemSpadeInfinite;
import net.be.mods.item.ItemSwordInfinite;
import net.be.mods.item.toolBlasterRifle;
import net.be.mods.item.toolDeathsScythe;
import net.be.mods.item.toolHIAxe;
import net.be.mods.item.toolHIHoe;
import net.be.mods.item.toolHIPickaxe;
import net.be.mods.item.toolHISpade;
import net.be.mods.item.toolHISword;
import net.be.mods.item.toolJewelChisel;
import net.be.mods.item.toolMasterSword;
import net.be.mods.item.toolMobSpawner;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemSeedFood;
import net.minecraft.item.ItemStack;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@Mod(modid = MainModBE.modid, name = "BE mods", version = "Pre-alpha v0.001")
@NetworkMod(clientSideRequired = true, serverSideRequired = true)
public class MainModBE {

    public static final String modid = "beautifulexistence";

    public void preInit(FMLPreInitializationEvent e) {
        NetworkRegistry.instance().registerGuiHandler(MainModBE.instance, new GuiHandler());
    public static MainModBE instance;
    public static String GuiTexturePrefix = "beautifulexistence" + ":" + "textures/gui/";
    //Event Manager!
    //CraftingHandler craftinghandler = new CraftingHandler();
    EventManager eventmanager = new EventManager();

    public static CreativeTabs BETab;


    //Initialize Blocks!

    public static Block cropEnder;
    //Initialize Items!

    public static Item itemSeedEnder;

    public void load(FMLInitializationEvent e)
    	//Event Manager
    	//GameRegistry.registerCraftingHandler(new CraftingHandler());
        BETab = new CreativeTabs("BETab") {
            public int getTabIconItemIndex() {
                return itemInfiniteCore.itemID;

        //Load Blocks!
        cropEnder = new cropEnder(3005).setUnlocalizedName("cropEnder");
        GameRegistry.registerBlock(cropEnder, modid + cropEnder.getUnlocalizedName().substring(5));
        LanguageRegistry.addName(cropEnder, "Ender Crop");
        //Load Items!
        itemSeedEnder = new ItemSeedFood(7040, 0, 0.0F, cropEnder.blockID, Block.whiteStone.blockID).setUnlocalizedName("seedEnder").setTextureName(modid + ":" + "seedEnder").setCreativeTab(BETab);
        registerItem(itemSeedEnder, "Ender Seed");

    public void registerBlock(Block block, String name)
        GameRegistry.registerBlock(block, block.getUnlocalizedName());
        LanguageRegistry.addName(block, name);

    public void registerItem(Item item, String name)
        GameRegistry.registerItem(item, item.getUnlocalizedName());
        LanguageRegistry.addName(item, name);


Crop Class:

package net.be.mods.block;

import java.util.Random;

import net.be.mods.MainModBE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.Icon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class cropEnder extends BlockCrops {

private Icon[] iconArray;

public cropEnder(int par1) {

public Icon getIcon(int side, int metadata) {
	if(metadata < 7) {
		if(metadata == 6) {
			metadata = 5;

		return iconArray[metadata >> 1];


	return iconArray[3];

public int getSeedItem() {
	return MainModBE.itemSeedEnder.itemID;

public int getCropItem() {
	return Item.enderPearl.itemID;

    public int idDropped(int par1, Random par2Random, int par3)
        return par1 == 7 ? this.getCropItem() : this.getSeedItem();

public int quantityDropped() {
	return 1;

public boolean canThisPlantGrowOnThisBlockID(int par1) {
	return par1 == Block.tilledField.blockID + Block.whiteStone.blockID + Block.grass.blockID;

public void registerIcons(IconRegister iconRegister) {
	this.iconArray = new Icon[4];

	for(int i = 0; i < this.iconArray.length; i++) {
		this.iconArray[i] = iconRegister.registerIcon(MainModBE.modid + ":" + "ender_" + (i+1));



Btw, I took out the unrelated stuff in the main class.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.