slipcor / TreeAssist

https://www.spigotmc.org/resources/treeassist.67436/
GNU General Public License v3.0
34 stars 19 forks source link

Config "Only Above" should delete also broken log. #80

Closed qSLX closed 3 years ago

qSLX commented 3 years ago

Isn't option "Only Above" should also destroy broken block? It would be more practical. Currently with this option set we cannot destroy lowest block and replanting also will not work.

In TreeAssist/TreeStructure.java:1444 the code is different than comment says: 'In case someone set the "Only Above" setting, we remove the blocks below the broken block from the list of blocks to be broken', but in code we have "b.getY() <= block.getY()" instead of "b.getY() < block.getY()", which deletes broken log from list of blocks to remove from the world and it stays in place after cutting tree.

slipcor commented 3 years ago

You are absolutely correct. Which is interesting because I recently fixed this for someone who wanted this feature and it was wrong in some way and now it breaks basic functionality even.

However I think your case is special in that the way your automatic removal is set up, that automatic removal also cancels the actual initial block breaking event.

This would all be fine and not a problem, had I used the suggested smaller sign. I will do this first time in the morning :)

Thank you for bringing this to my attention, even with code linked 👍 very much appreciated!