How to code a flower on Minecraft?

I have look at tutorials and wrote a class file however, in game the flower appears to not work. Any help is greatly appreciated. Heres the code and the result;

package ark.dragonmod.plant;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.Ic…
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import ark.dragonmod.common.DragonMod;

public class PlantDragonic extends Block implements IPlantable {

public PlantDragonic(int par1, Material par2Material) {
super(par1, par2Material);
this.setCreativeTab(DragonMod.TabDrag…
this.setTickRandomly(true);
}

protected PlantDragonic(int par1)
{
this(par1, Material.plants);
}

@Override
public EnumPlantType getPlantType(World world, int x, int y, int z) {
return null;
}

@Override
public int getPlantID(World world, int x, int y, int z) {
return blockID;
}

@Override
public int getPlantMetadata(World world, int x, int y, int z) {
return 0;
}

public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {
return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4);
}
protected boolean canThisPlantGrowOnThisBlockID(int par1) {
return par1 == DragonMod.DirtCharred.blockID;
}
How to code a flower on Minecraft

Added (1). @Override
public boolean canBlockStay(World world, int x, int y, int z)
{
int soilBlockID = world.getBlockId(x, y - 1, z);
return (soilBlockID == DragonMod.DirtCharred.blockID || (soilBlockID == Block.dirt.blockID || soilBlockID == Block.grass.blockID. ;
}

public boolean isOpaqueCude() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return 1;
}

. Can't seem to be able to post the whole class file.

Added (2). public void updateTick(World par1World, int par2, int par3, int par4, Random par5random) {
this.checkFlowerChange(par1World, par2, par3, par4);
}

protected final void checkFlowerChange(World par1World, int par2, int par3, int par4) {
if(!this.canBlockStay(par1World, par2, par3, par4. {
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlock(par2, par3, par4, 0, 0, 2);
}
}

Added (3). public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
super.onNeighborBlockChange(par1World… Par2, par3, par4, par5);
this.checkFlowerChange(par1World, par2, par3, par4);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int i, int j, int k) {
return null;
}
public int idDropped(int par1, Random par2Random, int par3) {
return this.blockID;
}
public int quantityDropped(Random par2Random) {
return 1;
}

Added (4). public void registerIcons(IconRegister iconRegister) {
blockIcon = iconRegister.registerIcon("DragonMod: Dra…
}
}
. That's the rest, sry for the length, wasn't sure how to include the class file.

I seriously doubt you'll get any help on here. Few people are programmers, even less know the Minecraft Forge API and even fewer will bother looking through your code to find the bug.

You should go to the Minecraft Forge forums, they can give you a lot more help there than anyone here can.