gottsch Posted January 8, 2021 Posted January 8, 2021 (edited) HI. I've added a custom test Feature, which adds a block to the surface. What i'm noticing is that the Feature generation is running every time a chunk loads. Isn't it only supposed to run once on chunk generation? Thanks Edited January 8, 2021 by gottsch Quote
ChampionAsh5357 Posted January 8, 2021 Posted January 8, 2021 Well, a feature can generate in every chunk within a specific biome. As such, the feature is resolved every time a new chunk loads. Only existing chunks will not generate a feature as they are already resolved. Quote
gottsch Posted January 8, 2021 Author Posted January 8, 2021 Thanks ChampionAsh. That was my assumption on how it would work. Maybe it is the term "resolved" that could use more explaining. I did some more testing: 1. exploring my immediate area. 2. save and exit. 3. load world repeat steps 2 and 3. There are a set of chunks a distance away from me that generate on every load. If I get closer to them and save, exit and reload, then they won't generate. Does minecraft pre-generate non-visible chunks and then resolve them when they come within the render distance (thus being re-generated if they never were in render distance)? Quote
ChampionAsh5357 Posted January 8, 2021 Posted January 8, 2021 1 hour ago, gottsch said: Does minecraft pre-generate non-visible chunks and then resolve them when they come within the render distance (thus being re-generated if they never were in render distance)? So, yes and no. Chunk generation is handled asynchronously to reduce the strain on the main thread and avoid any major lag spike. A chunk on generation is a ChunkPrimer where it uses the players location to determine whether to resolve. Once resolved, that Chunk will never change from world generation. However, these chunks can be partially resolved when being loaded. This allows certain features or structures to be determined without actually resolving the chunk itself. I'm guessing that's what you mean by pre-generating non-visible chunks. The rendering and actual logic of chunks is handled separately. Logic will only happen within an 8 chunk square around the player while rendering can show any specified distance. Rendering iirc partially resolves the chunk and the logic on the server fully loads in once the player gets close enough. Since the game uses a seed which determines almost everything about world generation, it isn't hard to partially resolve a chunk on the client until it needs to be resolved on the server. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.