Some BO3 Branches can get skipped during generation
riddle opened this issue · 9 comments
We are creating a custom mineshaft made out of BO3 branches and hit a wall:
This is a missing tunnel piece, but as you can see it is just skipped when “pasting” into the world – there is another piece coming out of it on the left side.
Here’s a slightly better shot:
The piece with 4 Nether Brick columns is the origin/root piece. It has 4 emerald blocks which can spawn 4 more tunnel pieces (branches). Those branches can spawn their own (and they are also marked with emerald blocks for posterity).
The problem happens in other parts too:
As you can see, an entire branch seems to have been skipped, but a branch is still spawned on the end of where that would be.
I’m sorry I’m reposting this from forums, I just think this is a technical issue (or a bug), not a brainstorming/feature discussion. If it’s in the wrong spot, I apologize.
On top of that we found that:
- We haven’t seen two pieces missing one after another.
- Other BO3 branched structures don’t affect this case (we have custom glowstone crystals done using a similar technique, appearing near the ceiling)
- Only tunnel pieces are missing (stairs and intersections were fine) – they are 12 blocks long, 4 wide, 4 high.
- Every missing tunnel piece (out of 12 we investigated) spans two chunks (exists on a chunk border). The issue here is obviously that any further piece (after the missing one) is also very likely to generate on a chunk border… but they don’t get eaten up.
We found that the gap between end of the chunk and next piece (which miraculously generates) after the missing one is always 2-3 blocks.
The origin piece is 16 by 16 but doesn’t fit in the chunk precisely:
@rutgerkok I also want to mention that if you want to see what’s wrong yourself and debug, we have all configuration files in a private GitHub repo (competitive reasons) and will add you if you mention it. I decided against adding you involuntarily because—well—I don’t want to spam you or presume your interest.
It's more difficult to fix than I thought. I made an image to illustrate it:
Orange area: potentially unloaded chunks.
Gray area: chunks guaranteed to be loaded.
Green area: area where population happens.
The BO3 drawn here (the rectangle) is 16 blocks wide - not too wide, you'd think? Well, because the origin of BO3 isn't exactly at the center it can sometimes extend into unloaded chunks. This causes this BO3 not to be spawned at all.
I think I will be able to fix this - the rest of the BO3 needs to be finished later on. This work will also result in BO3s of any size being able to spawn in structures.
Great, I’m glad we could provide enough info in this report. :)
Thanks for looking at it and thinking how to fix it. This part excites me too:
This work will also result in BO3s of any size being able to spawn in structures.
:D!
Unfortunatily, splitting a BO3 over multiple chunks wasn't possible. Structures are allowed to have objects spawn with the origin on the highest block. Determining the highest block is not possible when the origin of the BO3 is in an unloaded chunk...
But the original issue is now fixed. TC now calculates the dimensions of each object on server start and uses those to find the best chunk to spawn the object in. Objects part of a structure will now always be spawned, as long as they aren't larger than 16x16 blocks on the x/z axis.