
[1.20.1 Forge] Separated Leaves causes issues with structure mods/datapacks that rely on leaves surviving with any logs
TelepathicGrunt opened this issue ยท 5 comments
In my mod Bumblezone, I have some structures that mix and match certain logs and leaves to create a variety of interesting trees. Many other mods and datapacks do the same.
However when Separated Leaves is on, it makes no distinction between structure spawned leaves and non-structure leaves. And so it decays the leaves in our structures and makes it look awful. I choose not to make the leave persistent property set to true as I want it to decay if attached to no logs at all but otherwise, should remain.
This is what I am seeing currently in TNP Limitless 7 with my mod and Separated Leaves on. This is my White Sempiternal Sanctum structure spawning trees using NBT structure files.
I also have a Hanging Gardens structure that does the same thing of mix and matching leaves and logs for fun.
I'm sorry, but the reason that it makes no distinction between structure spawned leaves and non-structure leaves, is because there is no difference between the two. There is no way for me to tell if the leaves came from a structure and to which logs they should connect. I guess the only solutions are to make sure the leaves in the structure are persistent, or to make a datapack to change which blocks the leaves stick to, or to play without separated leaves.
Alternative, add a structure blacklist config and stick my mod's structures by default in it and pack makers can add more. You can check if location is in bounds of a structure and not perform your logic if it is in a blacklisted structure
Actually this code example is better. It can just be a tag and two line to check if in bounds of any structure in the tag
https://github.com/TelepathicGrunt/Bumblezone/blob/f4678292c7f965ec6943ae50d15933f4c80abda8/common/src/main/java/com/telepathicgrunt/the_bumblezone/worldgen/structures/SempiternalSanctumBehavior.java#L34-L35