Oh The Trees You'll Grow

Oh The Trees You'll Grow

7M Downloads

Trees do not check for empty space while generating and can break villages

Darsenia opened this issue ยท 5 comments

commented

They don't check for air. Trees are often inside each other, both their trunks and leaves. The worst effect of this are trees penetrating village houses. I know that block checking is a highly performance-affecting thing, but trees without any restrictions cause a lot of both visual and gameplay issues.

commented

image
image

commented

I second this, we have run into a lot of issues with this and structures in bwg

commented

I see that vanilla features do proper block checks and they do not replace blocks or go inside village houses. Also the placed feature's "placement block predicates" do well with tags and block checking. Maybe code of those things may help?
It is possible to add some checks with predicates to features, but it is impossible to check every block, too many checks for a human and a .json file :-D
I see you have "can_leaves_place_filter": {
"type": "minecraft:replaceable"
}"
thingy in the feature, so the checks in the code are present while generating blocks from the nbt, but they still replace blocks of other trees and structures. There is some mice hole in the code somewhere there
If the problem is that the trees do not "see" blocks in the world, I think maybe there can be other ways to do checks like getting blockstate from a different source or using tags, material.air, whatever it is called nowdays, I'm not in coding ever since 1.12

Anyway guys you've done amazing job with this mod. Nbt are so much better for memory usage,using wool for anchor to generate tree exactly from the center and removing floating trees by placing logs under the trunk-it's just genius! =))
I'm sure you will find a way to fix this issue. This mod is a life-saver for creative people!

commented

Best thing I can do for this is check every block position prior to placing the tree but that just seems expensive

commented

Fixed in 7bb9c5d