Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.