FallingTree

FallingTree

28M Downloads

Griefing caused by lack of distinction between player-placed leaves and naturally-generated ones.

bneils opened this issue ยท 4 comments

commented

Describe the feature

Currently, when players break logs that are apart of builds that ALSO have leaves, e.g. a grandfather tree, the entire thing gets destroyed. You can probably see how this is problematic. Regardless of the shift setting to trigger it, players will eventually cause irreparable harm to their builds, so I propose a solution.

Have the tree chopper only trigger when it detects leaves with the state [persistent=false], which indicates that it was naturally generated, rather than [persistent=true] which means a player used shears or silk touch on them.

commented

Fallingtree doesn't removes leaves by itself. It just forces a random tick on the leaves.
What happens after is the leaf itself that decides it.
In the case of Mojang it indeed checks the persistent flag. For the mod you mentioned i don't know what is performed.

commented

I think you misunderstood. The decay is fine, it's just that certain player-placed logs are being destroyed by axes (in one fell swoop), which means any build that makes use of player-placed leaves and player-placed logs will get destroyed by accident. I noticed that the logs are only instant mined when they're connected to leaves, so I suggested that they have to be connected to leaves that have [persistent=false], which creates a distinction between player builds and nature.

commented

Indeed I didn't understood correctly.

I get your point and is valid. However, I'll have to think about that change. To me it sounds like the persistent flag is at the discretion of the block itself and could behave differently if it's a leaf comming from a mod (some doesn't even have that flag).

The adjacent blocks feature was made for that use case, distinguishing build from trees (#54).
I guess that when the tree is built its not just log and leaves but got more details like fences or things like that that could tell the search to be stopped.
(If it's not the case then a non whitelisted adjacent block could be placed a under on inside the tree, like that it'd be adjacent and not visible)

commented

I added this as an option. By default leaves with the persistent flag will count towards the "minimum around required" counter.
I may change the default as it indeed makes sense to not count them.

If a leaf doesn't have that property (modded leaf for example), it'll will be considered as persistent=false.

If wanna give it a shot you can try that version and see if it matches your need.