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