![Chunk By Chunk](https://media.forgecdn.net/avatars/thumbnails/477/902/256/256/637773032814198799.png)
Leaf Decay - disable for blocks loaded by chunk generation?
xFirefalconx opened this issue ยท 5 comments
It's a bit difficult to load chunks with forests in it, especially modded leaf blocks sometimes escape the usual leaf behaviour.
I wonder if leaves from the overworld could be overwritten with a "no decay" flag if there is a wood log in the overworld close by? This would potentially eat up more generation time but it would also help reduce cut off tree crowns that I've sadly seen a lot in my world.
Do you think a thing as such is possible (especially for 1.18.2 as I will stay on this version)?
Perfect that sounds like exactly the idea I had myself. Let me know if you need a tester ๐
I wouldn't want to do anything too complex. Potentially I could add a config option to flag all leaf blocks not to decay.
I fully understand that. I just wonder if only CBC blocks could be affected when copied by only overwriting/flagging copied ones? So new trees that grow are unaffected.
Something like (pseudo code)
while (copying)
{
if (configOptionDisableChunkSpawnDecay)
{
scan blockType;
if (blockType isLeaf)
{
add flag noDecay; //the no decay flag you mentioned
}
}
else break; //or continue with whatever I am a noob lol
}
I just wonder if only CBC blocks could be affected when copied by only overwriting/flagging copied ones?
That is what I meant, yes. In the code that is copying I would check if the block is leaf and then do whatever is needed to mark it not to decay (I haven't looked at exactly how this is implemented yet, but I gather since player-placed leaves don't decay there is something in place for it).