slipcor / TreeAssist

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

Make semifloating trees valid #76

Closed molor closed 2 years ago

molor commented 3 years ago

Moved from https://github.com/slipcor/TreeAssist/issues/75#issuecomment-867896869 to fix problems like this.

image

slipcor commented 3 years ago

short comment here: this applies to all tree types, they can randomly generate in mid air, I have seen 2 blocks distance so far, can be water and air.

This needs a hackfix, but only for "the main tree" and not "when finding neighbors"

I think I have an idea where to hook into:

https://github.com/slipcor/TreeAssist/blob/master/src/main/java/net/slipcor/treeassist/discovery/TreeStructure.java#L104

This needs to support air. Globally and generally, but only if "onlyTrunk" is false, that is the case when we find "the main" tree that we are currently cutting down.

slipcor commented 3 years ago

Okay I will try my luck again another day. Today's results have not been great. I tried allowing a gap of 2 blocks below the trunk. This lead to two different issues with regular trees that work normally currently:

1) Dark Oak trees that are next to a hill think they have more than 4 trunks, because branches that hang low will be considered "having a gap" , and I regularly get false positive results like "found 6 trunks" and this leads to a failure. Trying to override might still cause trouble as some of these trunks will be actually invalid because they do not go all the way up, and/or they might not have enough leaves where they end (this is a critical error in tree determination)

2) Really tall jungle trees sometimes only remove 1/4 of their trunks, I think they are not recognized as "thick trees" any more. The reason for this is unclear to me.

slipcor commented 2 years ago

This is too much of a clash with my current logic. It seems not compatible. I am sorry :(