You have to replace the vanilla trees with your own; the simplest way is to override "getRandomWorldGenForTrees" in your custom biome class (I don't know if it is still called that in 1.12.2, the following code is all from 1.6.4, and my custom code is not from a Forge mod):
For more complex biomes though you'll probably want to use your own methods to place trees; for example, this is my BiomeGenMegaForest class, which places trees in a way so they can generate under other trees (vanilla only lets trees generate on blocks directly exposed to the sky; I use custom code which creates and reads a heightmap of the topmost exposed grass/dirt blocks), as well as adding additional clearance around each mega tree to avoid cascading chunk generation since they can exceed 17x17 (+/- 8 from the center) blocks in size, the maximum normally allowed (if a feature is too large it will spill over into unloaded chunks, causing them to load or generate, and possibly be populated, causing even more chunks to load, possibly even crashing the game, or at least causing severe lag; for structures more than 32x32 blocks in size you'll have to generate them differently):
package net.minecraft.src;
import java.util.Random;
public class BiomeGenMegaForest extends BiomeGenBase
{
private static final WorldGenerator smallTreeGenerator = new WorldGenSmallTrees(5, -1, 0, 0, false);
private static final WorldGenerator bushGenerator = new WorldGenBush(false);
private static final WorldGenerator megaTreeGen = new WorldGenMegaTree();
public BiomeGenMegaForest(int par1)
{
super(par1);
// Trees are generated using custom methods, so BiomeDecorator adds no trees
((BiomeDecoratorTMCW)this.theBiomeDecorator).treesPerChunk = -999;
((BiomeDecoratorTMCW)this.theBiomeDecorator).grassPerChunk = 7;
}
// Returns bushes when type is odd and oak trees when par1 is even
private WorldGenerator getRandomTree(Random par1Random, int type)
{
return (type & 1) == 1 ? this.bushGenerator : this.smallTreeGenerator;
}
// Retards fire spread to reduce threat of massive forest fires (normally set when rainfall is greater
// than 0.85, only used by BlockFire)
public boolean isHighHumidity()
{
return true;
}
public void decorate(World par1World, Random par2Random, int chunkX, int chunkZ)
{
// Generates initial height map (exposed grass blcoks) so trees are placed at ground level
this.createHeightMap(par1World, chunkX + 8, chunkZ + 8);
int i;
int x;
int y;
int z;
WorldGenerator treeGenerator;
this.treeRestrictionRadius = 3;
// Makes 3 attempts per chunk of generating one mega tree
for (i = 0; i < 3; ++i)
{
// Offset gives 3 blocks of extra space sround trees
x = chunkX + par2Random.nextInt(10) + 11;
z = chunkZ + par2Random.nextInt(10) + 11;
y = this.getTopBlock(par1World, x, z, true);
if (y > 0)
{
if (this.megaTreeGen.generate(par1World, par2Random, x, y, z)) break;
}
}
// Generates big oak trees before other trees in order to get more full-size trees
// Trees are generated in a checkerboard pattern, every other chunk; plus a 50% chance
// per chunk; 2 attempts to generate a tree
if ((((chunkX / 16) & 1) == 0 && ((chunkZ / 16) & 1) == 0) || par2Random.nextBoolean())
{
for (i = 0; i < 2; ++i)
{
x = chunkX + par2Random.nextInt(8) + 12;
z = chunkZ + par2Random.nextInt(8) + 12;
y = this.getTopBlock(par1World, x, z, true);
if (y > 0)
{
this.worldGeneratorBigTree.setScale(1.0D, 1.0D, 1.0D);
// 50% of trees have an extra size boost (same as Big Oak Forest trees)
if (par2Random.nextBoolean()) this.worldGeneratorBigTree.setScale(-999.0D, 1.0D, 1.0D);
if (this.worldGeneratorBigTree.generate(par1World, par2Random, x, y, z)) break;
}
}
}
// Other trees
int numberOfTrees = this.getRandomTreeDensity(par1World.getSeed(), chunkX, chunkZ, 10) + 5;
this.treeRestrictionRadius = 2;
for (i = 0; i < numberOfTrees; ++i)
{
x = chunkX + par2Random.nextInt(16) + 8;
z = chunkZ + par2Random.nextInt(16) + 8;
y = this.getTopBlock(par1World, x, z, true);
if (y > 0)
{
treeGenerator = this.getRandomTree(par2Random, i);
treeGenerator.generate(par1World, par2Random, x, y, z);
}
}
// One attempt at another mega tree, using getHeightValue so empty spaces are selected
x = chunkX + par2Random.nextInt(10) + 11;
z = chunkZ + par2Random.nextInt(10) + 11;
this.megaTreeGen.generate(par1World, par2Random, x, par1World.getHeightValue(x, z), z);
super.decorate(par1World, par2Random, chunkX, chunkZ);
}
}
Note that getRandomWorldGenForTrees is called by BiomeDecorator so if you use it you do not need to add your own code to place trees; the number of attempts at generating a tree is defined by a field within BiomeDecorator (treesPerChunk, which I set to -999 to disable them; you must use a negative number to completely disable trees as there is a 1/10 chance per chunk of adding 1 to this value, which generates the trees you rarely find in Extreme Hills, Ocean, and River biomes, which default to 0).
Can someone show me a biome class that can generate custom trees (ie: trees that are 75 blocks tall)? Thanks!
PS: I googled but I can't find anything .
https://www.youtube.com/watch?v=E5_xb522jEo
I have a custom tree tutorial here: http://jabelarminecraft.blogspot.com
You have to replace the vanilla trees with your own; the simplest way is to override "getRandomWorldGenForTrees" in your custom biome class (I don't know if it is still called that in 1.12.2, the following code is all from 1.6.4, and my custom code is not from a Forge mod):
For example, this is in the BiomeGenForest class, which has birch trees in addition to oaks:
For more complex biomes though you'll probably want to use your own methods to place trees; for example, this is my BiomeGenMegaForest class, which places trees in a way so they can generate under other trees (vanilla only lets trees generate on blocks directly exposed to the sky; I use custom code which creates and reads a heightmap of the topmost exposed grass/dirt blocks), as well as adding additional clearance around each mega tree to avoid cascading chunk generation since they can exceed 17x17 (+/- 8 from the center) blocks in size, the maximum normally allowed (if a feature is too large it will spill over into unloaded chunks, causing them to load or generate, and possibly be populated, causing even more chunks to load, possibly even crashing the game, or at least causing severe lag; for structures more than 32x32 blocks in size you'll have to generate them differently):
Note that getRandomWorldGenForTrees is called by BiomeDecorator so if you use it you do not need to add your own code to place trees; the number of attempts at generating a tree is defined by a field within BiomeDecorator (treesPerChunk, which I set to -999 to disable them; you must use a negative number to completely disable trees as there is a 1/10 chance per chunk of adding 1 to this value, which generates the trees you rarely find in Extreme Hills, Ocean, and River biomes, which default to 0).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?