mojira.dev
MC-7294

Structures can be generated with different parts at different height

A structure may get generated with some square sections at different heights.

What I saw (presumably buggy)
I found a malformed temple as shown in screenshots in world with seed -807116175. That is, one square section of the temple is at height 1 block lower than the rest of the temple. The shift lines cross at exactly center-chunk (-984,-312), and the temple is created in 4 parts (depending on approach directions, though, but can be witnesses with map programs). I remember that I did first travel diagonally so that I saw only a part of this temple on a map, and later returned to check the temple and thus caused the generation of the rest of the area and the temple. Alas, I do not remember the order or directions of moving I happened to use.

However, I have not been able to reproduce the result with several tries, with generating the different chunks at different orders (by teleporting to different locations far away from the temple and then approaching).

What I expect
That all structures would be without weird level shifts. (Except perhaps in a case where the surrounding environment has similar shift, so it would sort of depict the result of an earthquake or something).

The other tries to reproduce the problem always generating the same temple in a way I would expect seems to indicate that the bugged version is indeed bugged, and not intended.

Speculation
The only reason (and I admit a weak reason) for this I have been able to think by reading the code, is that somehow the structure generator estimates the ground average heights differently for different sections. Using MCP naming: MapGenStructure.generateStructuresInChunk() -> ... ComponentScatteredFeature.(the only method in the class, no idea of its name other than 'func_74935_a'). If tree generation (the tree trunks' solid blocks) affects average level calculation, this could explain why I can not reproduce it (trees are different for each try; WTB a way to enforce everything to use the given seed).

If that (or something related) is found out to be the reason, perhaps the StructureStart-object should not only store the bounding box (which can even change as different parts are generated), but also the initially chosen elevation for the structure, and each generated part would then use that stored elevation instead of recalculating it and getting possibly different results.

Related issues

Attachments

Comments

migrated
[media][media][media]
migrated

Sounds pretty much like MC-15820.

bugi74

I already noticed that other issue and also thought of the similarity, but I don't think fixing one fixes the other, unless the fix is done at really "root cause" level (so, likely not a duplicate). This issue is likely 'related', though not sure to what extent. The root cause is likely the same/similar; parts of the structures being generated at different times, instead of all at once, and some data gets lost in between.

In this issue, it is the height of generation info that is lost, and the height gets recalculated differently the next time it continues. In the other issue, even the status of "generated/not generated" may get lost, and the generator can recreate parts of the structures, calculating the ground height as if the forgot-created-already -parts were ground. Hmm.. there could be some shared buggy code in that.

However, I have not yet seen temple-parts-on-temple, like those house-on-house things. Then again, temples are small, it is less probable that its generation is left unfinished, compared to large villages.

When stripes of village are missing, that might be due to having written "this is done already" while the blocks aren't saved yet. The order differences might even have something to do with compression. But that is 30 seconds speculation, for another issue.

(I gave up on trying to figure out the reason for this and the other issue myself; too complicated to debug with just MCP stuff and no nice development version etc. I leave these two for Mojang - they get paid for it even if they'd fail.)

migrated

Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

bugi74

Since I was not able to reproduce this issue back then, it is even more likely (with the new terrain generation changes) that I wouldn't be able to reproduce this any more at all.

As far as I'm concerned, this can be resolved/closed. I'll open a new case if I can find another example.

galaxy_2alex

Closed due to reporter's request.

bugi74

(Unassigned)

Unconfirmed

structure, world-generation

Minecraft 1.4.7

Retrieved