#Custom foliage placer - Leaves decaying when they shouldn't be
25 messages · Page 1 of 1 (latest)
My feature configuration class, where I register the PalmTree feature:
If I am in game and I grow my tree instance, then the leaves start to decay on the outside edge. I guess I just don't know what to tweak here to make it so that there is a bigger radius where my leaves wont decay.
Thought perhaps it was something to do with the settings passed into foliage placer, but I have no idea.
Bump, I'm also running into the same issue
You on 1.21.5?
maybe check the distance property in your palm leaves block?
because if it's equals to 7
your leaves will decay naturally
mb i haven't read the whole message
override the hasRandomTicks(BlockState state) method
and this one shouldDecay(BlockState state)
and find a way to change the fields MAX_DISTANCE and DISTANCE in the LeavesBlock class
or just make your leaves persistent
Oh nice, hadn't thought of that, I'll extend the leaves block class with my own class and change that!
Yeahd but you will need to rewrite most of the code
That might be a problem
Because the property is a final field
oof...great
(just copy paste the original code)
and if you plan on making more large trees like this consider making your class abstract
and putting getter methods
Strange that the base leaves don't have this set by default
Minecraft source code is sometimes weird lol