Despite what Wiki seems to say about free space around trees, they seem to grow just fine when planted side-by-side in a line. Makes a dandy fence to keep critters out, and it sure is easy to collect an immense number of logs rapidly.
The Wiki is notoriously out of date and/or just flat-out wrong (for example, it claims that level.dat_old is a backup from converting an Alpha world - not true at all, at least not since Beta - it is a backup of level.dat that is made every time the game saves it. Or my favorite myth, that caves/ravines can overwrite End portals, which is also simply not true (in fact, my first world has a fully intact portal room that is intersected by two ravines and a mineshaft, both of which were overwritten), indeed, even if they weren't generated as terrain (chunks are generated in two stages, first the terrain, including caves, then decorations, including structures) they can only cut through a limited number of blocks (just stone, dirt, and grass in 1.6.4 so deserts and mushroom islands did not have cave openings, a few more since but still not even all terrain blocks. Conversely, in my own mods I allow them to cut through all blocks above y=0 with no issues. Everything else just doesn't overwrite air, like the walls of most parts of a stronghold, but not the interior parts, even blocks like doors will be placed without a valid block below them - I only had to change a single line of code to allow strongholds to fully generate in the air, much as prior to 1.13 there was a check for liquids which would prevent all but the portal room from generating underwater).
As far as trees go, it was true that they used to require more space around them, for example, in 1.6.4 you can only plant oak and jungle saplings next to each other, and 2x2 jungle trees if you remove the vines from adjacent trees (this was annoying enough, especially for spruces, that I changed it myself so that most saplings only check for space directly above them and leaves, wood, vines, and snow layers are ignored when generating trees that require more space, such as branched trees, and even then only the branches themselves are subject to space restrictions, not the entire tree). I believe the main reason for the changes since then is code consistency; 1.6.4 has multiple different classes to generate different tree types, even different classes for small oaks and birches despite being exactly the same (birches are slightly taller but the code used by oaks has a height parameter) and it would have been better to place the space checks in a common base class, as Mojang did later on:
WorldGenForest (birch trees) and WorldGenTaiga# (spruce trees, same for both types but only one type can be grown by the player):
if (var12 != 0 && var12 != Block.leaves.blockID)
WorldGenHugeTrees (2x2 jungle trees. Only type that ignores saplings, but all types ignore blocks at the base anyway. Branches can replace any blocks in the way, similar to the dark oak bedrock glitch in 1.7):
WorldGenBigTree (big oaks. The volume checked is only 1x1 so you can force them to grow by placing an obstruction next to the trunk; individual branches only grow if they are unobstructed):
if (var16 != 0 && var16 != Block.leaves.blockID)
From TMCW's WorldGenTMCW base class, which is used by all types of trees:
// Checks for blocks that allow trees to grow; if flag is true allows dirt/grass/vines as well
// (used by trees which check a volume instead of only above the trunk)
protected final boolean canTreeGrowThroughBlock(int block, boolean flag)
return (block == 0 || Block.isLeafBlock(block) || block == Block.wood.blockID || (flag && (block == Block.dirt.blockID || block == Block.grass.blockID || block == Block.vine.blockID)));
This also explains why trees grow through blocks like dirt (in 1.6.4 trees that don't check for grass/dirt blocks are noticeably less common on hillsides, I fixed this by only checking for them when checking away from the trunk). Also, in 1.6.4 spruce leaves can replace non-solid blocks like glass and torches (presumably done so they could replace snow layers but they simply checked if a block was an opaque cube, while other trees only include air and leaves, the latter redundant).