Jump to content

[1.14.4] How to generate a custom tree in my world?


Recommended Posts

I'm kinda lost on how to generate a tree in my world. I have created a tree that can spawn from a sapling, but I've not been able to generate one naturally in my world. I do have a class that generates a custom ore in my world, but I can't seem to get it to extend to trees, and the source files haven't really been much help for me. Does anyone have a good way to generate trees? I've even looked through the source files of Biomes O' Plenty for 1.14.4 for some help, but they havent given me any.


Here is some code.



package com.mmyron.WickedAdditions.world;

import com.mmyron.WickedAdditions.config.TreeConfig;

import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.GenerationStage.Decoration;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.MultipleRandomFeatureConfig;
import net.minecraft.world.gen.placement.CountRangeConfig;
import net.minecraft.world.gen.placement.IPlacementConfig;
import net.minecraft.world.gen.placement.Placement;
import net.minecraftforge.registries.ForgeRegistries;

public class TreeGeneration {
    //Vein Count, minHeight, maxHeightBase, maxHeight
    private static final CountRangeConfig skinny_pine_tree_gen_cfg =  new CountRangeConfig(100, 64, 0, 164);
    public static void setupTreeGen() {
        for(Biome biome: ForgeRegistries.BIOMES) {
            if (biome.getCategory() == Biome.Category.THEEND) continue;
            if (biome.getCategory() == Biome.Category.NETHER) continue;
            if(TreeConfig.enableSkinnyPineTree) {
                biome.addFeature(); //?????




package com.mmyron.WickedAdditions.world.gen.feature;

import net.minecraft.world.gen.feature.AbstractTreeFeature;
import net.minecraft.world.gen.feature.NoFeatureConfig;

public class ModBiomeFeatures {
    public static final AbstractTreeFeature<NoFeatureConfig> SKINNY_PINE_TREE;
    static {
        //SKINNY_PINE_TREE = ???


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.