Skip to content

Add leaves instant decay option#1803

Merged
granny merged 3 commits into
PurpurMC:ver/26.2from
kacimiamine:feat/leaves-instant-decay
Jul 19, 2026
Merged

Add leaves instant decay option#1803
granny merged 3 commits into
PurpurMC:ver/26.2from
kacimiamine:feat/leaves-instant-decay

Conversation

@kacimiamine

@kacimiamine kacimiamine commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Add a new option to instant decay the leaves after breaking a tree.

Note that even if randomTick() gets called every tick in tick() , it doesn't have any performance issues even if it runs on ALL leaves, since for leaves not decaying, it's just a boolean check and return.

I tested this and I didn't see any issues. This would be a nice addition since doing it with a plugin requires a bit more logic and might not be as intended.

How this works:
https://discord.com/channels/685683385313919172/720374890472931328/1525151676447723523

Update: thanks to Billy's suggestion, we made a new method instead of randomTick, so depending on the config, only one of them will fire (either decay on randomTick, or decay on tick if config is enabled)

This is better so that we ared not firing randomTick twice as this may cause issues with plugins that listen to the event

@granny granny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@granny
granny merged commit 21a4154 into PurpurMC:ver/26.2 Jul 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants