You need to have a stone axe at least to start. Without it you can't create a tool? unless your starting inventory consists of stone and sticks.
You may be able to ray trace hits onto a tree, then use some logic to determine if the tree yields bark, leaves, etc. Then use custom object insertion to add the items to the players inventory.
Thanks for the reply....... I am going through a couple of ideas on how to do this without having a stone axe to start with.
I would leave the fruit trees alone as I would want them to have figs, grapes, olives, plums, and wild berries.
Non-Fruit trees would be used for getting the leaves and bark from...... these could just be pulled off a tree without tools. Wood would come from trees at a later stage when more advanced tools are built.
While I have modded several other games this is the first time I have looked at using java so I need to learn how to ray trace hits, use logic in java and use custom object insertion.
I will eventually work it out as I get a better understanding of how to do all of this.
The trick with modding is not to start with complex jobs first but to start small.