#Vanilla-Like Leaves

1 messages · Page 1 of 1 (latest)

valid pier
#

Useful research for someone using the custom components to make leaves. These notes are so shitty, sorry in advance. Things are a bit more complicated than the wiki lets on.

The way leaves work is they have a persistent bit and an update bit.

Naturally placed leaves have persistent set to false. Player placed leaves have that set to true.

Only non-persistent leaves consider the update bit. The update bit is set to false by default via world-gen. When a leaf is broken, all leaves in the 3 by 3 by 3 centered on where that leaf was have their update bit set to true. When a log is broken, all leaves in the 9 by 9 by 9 centered on where that log was have their update bit set to true.

Once update bit is true, the leaves will be randomly ticked. When randomly ticked, if there isn't a log (seemingly, of any type, even a mismatched type) within 4 blocks taxicab distance, the leaf will turn to air and drop its loot.

Need to see what type of leaves and logs the update bit going from false to true is affected by. I know those 2 are at least affected by command block removals, not just onPlayerDestroyed. Update: it's any kind of leaves or any kind of logs.

timid spire
valid pier
#

Minecraft Wiki

timid spire
#

😅

Leaves from trees spontaneously decay (disappear) when they receive a block tick if they are not connected to a block with the logs tag (log or wood block), either directly or via other leaf blocks, with a maximum distance of 6 blocks‌[Java Edition only] or 4 blocks‌[Bedrock Edition only]. Leaves placed by players never decay.
the tldr from the MC wiki which describes yours, it doesnt go into the technical details about block state updates

valid pier
#

Yep. That's what I was comparing against.

#

Doesn't even explain that there's a whole update process ahead of that. Hints at it in the block states table, but doesn't go into details.

jade osprey
#

@valid pier dose leaves/log type matter?

valid pier
jade osprey
#

@valid pier how leaves blocks effect light?
the wiki didn't go in details

valid pier
#

I'm afraid I don't know… sorry! I only concerned myself with the growing stuff.

timid spire
valid pier
#

Doesn’t help with vanilla stuff, so it doesn’t matter.

timid spire
#

Is it high tick speed or neihgbour update that sets update bit back to 0, I cant tell.