HT's TreeChop

HT's TreeChop

3M Downloads

Horizontal log structures cause log duping

marcebdev opened this issue ยท 3 comments

commented

I happened to be playing Botania and when making Livingwood I realized that chopping horizontal wooden structure (logs were vertical) are detected both as a single block and multiblock so it drops the log on the first chop but then also turns into a chopped log block duping that log. I'd imagine some check is going wrong.

Might be worth some thought to delimit horizontal log structures that either have vertically facing logs or do not branch and aren't perfectly straight (i.e. squares, etc) as it will likely make onlyBreakTreesWithLeaves = false a bit more robust and would alleviate issues with certain modded tasks like in the case of making Livingwood with Botania.

Though I can understand the almost endless list of things to delimit. Another might be to add an enhanced option meant for onlyBreakTreesWithLeaves that only treats a log structure with no leaves if it is an exclusively vertical or horizontal line of logs facing each other (dead trees) or a vertical tree that has branches, allowing to catch for some modded leafless trees while largely avoiding other issues.

I imagine overall most people will opt to turn on onlyBreakTreesWithLeaves since it greatly reduces the number of false positives in comparison to the few occurrences you may run into a dead tree. I've switched that on which should help (though duping would still be a now hidden issue) but I agree with someone else that poses this as the default as it is much more compatible/predictable.

commented

A lot has changed since this issue was posted. Any buggy behavior regarding item drops should be fixed, and false positives for tree detection should be more manageable between the on-screen chop indicator and the in-game toggles for chop settings. Closing, but feel free to reopen if needed.

commented

Could you post before-and-after screenshots of chopping livingwood as you've described? Note that chopping always drops a block item on the first chop. It's a hack and will be changed as the mod develops.

Yeah, setting specific shape-based rules for tree detection gets really tricky. There are a lot of weirdly shaped modded trees, like v-shaped ones and ones with multiple trunks. Some use horizontal logs for branches, some don't. It gets messy quick! Maybe eventually I will allow for different detection rules depending on the type of tree being chopped.

onlyBreakTreesWithLeaves = true will be the default setting in the next version, which includes an in-game GUI for toggling this setting (and others) without having to restart. I just haven't had the time to test and publish the new version.

Thanks for posting here!

commented

Yeah definitely, it seems to happen with some other woods but I'll see what data I can gather for you when I get the chance. Sorry it took so long to get back after you instantly got back, been similarly busy.

Awesome mod btw!