Jump to content

1.15 Custom Tree Trunk Issue


Squrikle

Recommended Posts

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

spacer.png

Edited by Squrikle
Link to comment
Share on other sites

55 minutes ago, Squrikle said:
  1. public static final TreeFeatureConfig CEDAR_TREE_CONFIG = (new TreeFeatureConfig.Builder(
  2.             new SimpleBlockStateProvider(BlockInitNew.CEDAR_LOG.get().getDefaultState()),
  3.             new SimpleBlockStateProvider(BlockInitNew.CEDAR_LEAVES.get().getDefaultState()),
  4.             new SpruceFoliagePlacer(5, 0))).baseHeight(4).heightRandA(5).foliageHeight(5).ignoreVines()
  5.                 .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.

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.

Guest
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.