-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treecutting function #24
Comments
I was encouraged by @Flashing-Blinkenlights to post the current state of my Rust implementation for finding trees. Here it is: https://gist.github.com/terjesc/4e0d5d8e63fe034d803c7b2ac47084b7 Roughly, it:
For the BFS in 3:
There is some weirdness going on not giving quite the result that I want. (Sometimes the searched tree gets assigned a few too many leaves, when close to another tree of the same type, but for the most time it seems OK...) I think there might be multiple issues, as the code became quite clumsy. My thoughts for future improvement is to use the "distance to trunk" property of leaves directly, in order to vastly simplify the algorithm. (First find logs, then BFS for leaves by only adding leaves that have lower "distance to trunk" than the parent in the search.) |
Moved to avdstaaij/gdpc#24 |
Feature branch:
None
Currently, dealing with trees in forested areas can be difficult and improper execution can result in floating trees or leaves that won't decay due to nearby logs. It would be very convenient to have a function that, when called on a particular coordinate, detects and cleanly removes the tree.
Caution may be taken not to remove e.g. wooden support pillars (from mineshafts etc.).
Depending on the type of tree (e.g. Acacia), further steps may need to be taken to effectively remove the tree.
Help wanted:
Any suggestions or thoughts on the implementation of this issue will be warmly embraced.
Suggested implementation:
Pro:
Con:
The text was updated successfully, but these errors were encountered: