#Custom foliage placer - Leaves decaying when they shouldn't be

25 messages · Page 1 of 1 (latest)

simple thistle
#

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.

frail hound
#

Bump, I'm also running into the same issue

frail hound
exotic cairn
#

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

frail hound
exotic cairn
#

Yeahd but you will need to rewrite most of the code

#

That might be a problem

#

Because the property is a final field

frail hound
#

oof...great

exotic cairn
#

(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

frail hound
#

Strange that the base leaves don't have this set by default

exotic cairn
#

Minecraft source code is sometimes weird lol