Jump to content

[1.15.2] SOLVED - Leaf Generation replacing logs


Recommended Posts

Good morning everyone. 

After some serious searching on both these forums and Google, I find myself stuck and needing to ask for help. 

The situation:

I am creating custom trees using mod blocks. These custom tree features use custom foliagePlacers that extend the vanilla FoliagePlacer class. All of the blocks are initialized using Deferred Registeries. As of yet, I am not generating them in the world. All logs are included in the log tag json file. 

The problem:

'Some' of the trees are generated with leaves that replace the log blocks.  This of course causes issues as some of the leaves on the higher levels will despawn. 

What I've tried:

I have tried:

Coping / pasting code from the working foliagePlacers and tree features to the non-working files.   ->      this tells me that the issue is probably not in the placers or feature files. 

Insuring Tag files are correct.

Used the log to attempt an (if == log) to skip the leaf.  ->     Right before the leaves are placed, the block there is air. Perhaps the logs aren't being placed correctly?
Attempting to search vanilla code for ideas

Manually skipping positions where I 'know' a log is.    ->     While this might work for a particular tree shape or size, this won't work when I begin adding branches in random places. 


All in all, I'm hoping that I can get someone to put an extra pair of eyes on these and help me identify what I'm doing wrong or why some of these trees are working and why some aren't.  


Attached are copies of the feature and foliagePlacers. The "Walnut" tree is working, The "Fir" tree is not.  


Another side question:  This is my first post and while I've seen others wrap their code in a window I was unable to do so. I also didn't see a "read this first" within this subforum. I tried the normal ``` and ~~~ to no avail. If someone would point me to either the readMe or let me know what the escape chars are; I would be grateful and edit this post to include the appropriate code.  


FirFoliagePlacer.java WalnutFoliagePlacer.java FirTree.java WalnutTree.java

Edited by Jedipawn
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.