if(!MFRRegistry.getPlantables().containsKey(new Integer(availableStack.itemID)))
{
continue;
}
IFactoryPlantable plantable = MFRRegistry.getPlantables().get(new Integer(availableStack.itemID));
if(!plantable.canBePlantedHere(worldObj, bp.x, bp.y, bp.z, availableStack))
{
continue;
}
plantable.prePlant(worldObj, bp.x, bp.y, bp.z, availableStack);
worldObj.setBlock(bp.x, bp.y, bp.z,
plantable.getPlantedBlockId(worldObj, bp.x, bp.y, bp.z, availableStack),
plantable.getPlantedBlockMetadata(worldObj, bp.x, bp.y, bp.z, availableStack), 3);
plantable.postPlant(worldObj, bp.x, bp.y, bp.z, availableStack);
decrStackSize(stackIndex, 1);
return true;
}
setIdleTicks(getIdleTicksMax());