#Need help with custom leaves decay

1 messages · Page 1 of 1 (latest)

cyan estuary
#

Hey does anyone figured out custom leaves decay system if so can any one help me with it

sharp flare
mossy kestrel
sleek jacinth
#

Logically you’d have leaves spawned from tree growing to have a custom compo t and use on_random_tick to replace the block with air and run a loot table for stick and sapling… IF no connected wood blocks to the leaf block.
The search for wood in a volume around the leaf would stop the decay from occurring.
For leaves placed by the player do t have the custom component applied. So they wont decay ..

#

Reading that template - that’s pretty much what it does

#

I wonder if there’s a more efficient way to do the connected to log test to avoid needing to check as many blocks 🤔

sharp flare
#

I dont think so. It will still have to check every block, this method means it doesn't check the same block multiple times though

mossy kestrel
#

I don't know why, but the leaves template never worked for me, so I made my own based on the template and multiple other refrences to make my own custom. It works, but not the best.

sleek jacinth
#

i was wondering if a block could just quey its 6 adjacent ones - with each aware if they were attached to a log.. then change with "on player destroy" the state of blocks surrounding a log.. moving the work to just when the tree is felled (or reducing at least) vs dong it for each "on random tick"

#

would add more permulations though

sleek jacinth
#

it would definately work, and should be less laggy as its done once not repeatedly and only on a change to the "tree" and/or leaves

nocturne jasper