bukkit World Manipulation Generating a Tree


The following methods can be used to generate a tree naturally (as if it was grown from a sapling) into the world.

boolean generateTree(Location loc, TreeType type);
boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate);
  • Location is where you want the tree to spawn
  • TreeType is the type of the tree you want to spawn, and can be one of the following

TreeType enum

ACACIAAcacia tree
BIG_TREERegular tree, extra tall with branches
BIRCHBirch tree
BROWN_MUSHROOMBig brown mushroom; tall and umbrella-like
CHORUS_PLANTLarge plant native to The End
COCOA_TREEJungle tree with cocoa plants; 1 block wide
DARK_OAKDark Oak tree.
JUNGLEStandard jungle tree; 4 blocks wide and tall
JUNGLE_BUSHSmall bush that grows in the jungle
MEGA_REDWOODMega redwood tree; 4 blocks wide and tall
RED_MUSHROOMBig red mushroom; short and fat
REDWOODRedwood tree, shaped like a pine tree
SMALL_JUNGLESmaller jungle tree; 1 block wide
SWAMPSwamp tree (regular with vines on the side)
TALL_BIRCHTall birch tree
TALL_REDWODTall redwood tree with just a few leaves at the top
TREERegular tree, no branches
  • delegate may be used if you want a class to call for each block changed as a result of this method

Both signatures will return true if the tree was sucessfully generated, false otherwise.