Does planting a sapling on Farmland or or Damp Farmland help it grow into a bigger tree, or grow faster?
-
1I don't quite think so, but I have no way to actually deny this– badpCommented Oct 4, 2011 at 11:10
-
2I don't think so either, but it would involve looking at the code for sapling growth to be certain.– fredleyCommented Oct 4, 2011 at 11:14
-
From anecdotal evidence, saplings on farmland don't grow at all, though this was rather a long time ago and could've been an SMP quirk.– a catCommented Oct 4, 2011 at 14:03
Add a comment
|
1 Answer
From BlockSapling.java
:
public void growTree(World world, int i, int j, int k, Random random)
{
int l = world.getBlockMetadata(i, j, k) & 3;
world.setBlock(i, j, k, 0);
Object obj = null;
if(l == 1)
{
obj = new WorldGenTaiga2();
} else
if(l == 2)
{
obj = new WorldGenForest();
} else
{
obj = new WorldGenTrees();
if(random.nextInt(10) == 0)
{
obj = new WorldGenBigTree();
}
}
if(!((WorldGenerator) (obj)).generate(world, random, i, j, k))
{
world.setBlockAndMetadata(i, j, k, blockID, l);
}
}
There is no reference to the block the sapling is planted on.
(While world.getBlockMetaData(i, j, k)
looks suspicious, it is simply looking up what kind of tree the sapling should grow — pine, birch, or "normal".)
-
So can I plant saplings on cobblestone or obsidian or something goofy like that, and they'll grow?– Doktor JCommented Oct 7, 2011 at 16:36
-
1@DoktorJ IIRC, it won't let you plant saplings on anything except dirt and farmland. This code just grows a planted sapling, it doesn't determine where you can and cannot plant them. But, if you could plant it there, yes it would grow. Commented Oct 7, 2011 at 16:38