Chunk By Chunk

Chunk By Chunk

238k Downloads

Leaf Decay - disable for blocks loaded by chunk generation?

xFirefalconx opened this issue ยท 5 comments

commented

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)?

commented

Perfect that sounds like exactly the idea I had myself. Let me know if you need a tester ๐Ÿ˜„

commented

I wouldn't want to do anything too complex. Potentially I could add a config option to flag all leaf blocks not to decay.

commented

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
}
commented

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).

commented

Configuration option added in 1.13.0