Jump to content

Recommended Posts

Posted

I have come across several mushroom related files, but I just don't get how they spawn, or what controls it? I see the parameters detailed in assets/survival/worldgen/blockpatches/mushroom.json, but I don't see what triggers the actual process or where that is contained? 

From what I understand, this "spawn" check happens upon chunk generation, only, but where does that happen? And where is the file that checks for spawns post-generation? It seems like there aren't any plants/fungi that spawn post-generation, instead the fungi regrow where they initially spawn.. But I'm not sure where or how that check happens either. 

Hopefully I'm asking the right questions here.

  • 2 weeks later...
Posted

Those blockpatches are applied at worldgen (when the chunk is generated). It looks like when the mushroom spawns as part of worldgen, it spawns a Mycelium block entity at the root block's location. The Mycelium handles regrowing the mushroom when enough time has passed.

There isn't any information about it on the wiki. So you'll have to search the source code.

Posted

Thanks for the input Kyle, but what file(s) hold that handling code? I'd like to understand the mechanics behind the respawning and spawning of them and how the game is handling it. 
Appreciate your time!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.