Posted October 3, 20204 yr Hello, I am trying to add a custom tree to my mod. The issue I am facing is the tree trunk does not extend all the way up to the top. I have all ready added both the log and leaves to their respective tags. Please let me know if you need to see any other parts of my code. Here is my Tree Class code https://pastebin.com/77gwrk49 Edited October 3, 20204 yr by Squrikle
October 3, 20204 yr 55 minutes ago, Squrikle said: public static final TreeFeatureConfig CEDAR_TREE_CONFIG = (new TreeFeatureConfig.Builder( new SimpleBlockStateProvider(BlockInitNew.CEDAR_LOG.get().getDefaultState()), new SimpleBlockStateProvider(BlockInitNew.CEDAR_LEAVES.get().getDefaultState()), new SpruceFoliagePlacer(5, 0))).baseHeight(4).heightRandA(5).foliageHeight(5).ignoreVines() .setSapling((IPlantable)BlockInitNew.CEDAR_SAPLING.get()).build(); First, you can't do this, your block might not be initialized at that time and can throw an error. Also, the you could look at the configuration provided by a tree within DefaultBiomeFeatures and see the differences. A good one being that the foliage height is never greater than the base height. Another one being that the spruce foliage placer is never called with foliage height anywhere within the vanilla features. I haven't looked into trees all that much so I don't know exactly where it goes wrong, but you can assume that certain values are set and not set for specific reasons and use that to assume what are reasonable calls to chain or values to set.
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.