mojira.dev
MC-266519

Strongholds and trial chambers can intersect

Strongholds and trial chambers can intersect.

[media]
Seed: -1316865467785382608
Coordinates: 9885 -19 6186

The easiest fix would be to make trial chambers fail to generate within 400 blocks or so of a stronghold origin. Ultimately, two solutions to this kind of problem should be considered: the conversion of older structures to jigsaw generation and the implementation of a data-driven hierarchy of underground structures. For the latter, I suggest grouping structures into tiers; structures higher in a tier inhibit others in that tier from generating nearby while also completely overwriting structures in lower tiers. (If implemented correctly, #features_cannot_replace could probably be deprecated.) For the vanilla overworld this would probably be:

  • Tier 1

    • Stronghold

    • Ancient city

    • Trial chamber

  • Tier 2

    • Mineshaft

  • Tier 3

    • Monster room/dungeon (should probably also have additional logic to avoid generating inside other structures to prevent weird interactions like MC-265371)

    • Geode

This suggestion is WIP, a proper fix should also account for igloos, monuments and the like.

Linked issues

Attachments

Comments 4

End portals getting destroyed was fixed by #features_cannot_replace, but that was really a slapdash solution and I don't think any Mojang employee would defend it as final (it creates problems like [MC-266535]). And structure intersections are definitely valid bugs: stronghold-mineshaft is MC-13309, bastion-fortress is MC-171024, geode-stronghold is MC-225945, etc. Some intersections have been marked as intended, but even these are often overturned on review or considered valid after being fixed and regressed (MC-216881 is an example of the latter).

SigmoidFunction

Just stumbled across this suggestion and would like to express my opinion. The current jigsaw generation is unable to generate stronghold and fortress in the way they are in the current code. One big difference is that structures using jigsaw terminate their generation by counting the depth of the tree, but in the code of stronghold and fortress they terminate by counting how many of each individual component have generated, e.g. in stronghold there must be exactly 1 portal room, at most 2 libraries and at most 4 corridors with loot chest. 

Plus the generation of monument and mansion are based on assigning room units over an abstract grid, not a tree generation. Jigsaw cannot deal with them at all.

So the conversion of old structures to jigsaw generation will definitely be a huge rewrite. I doubt if mojang will ever bother doing so. 

That's certainly a good point. For strongholds at least I feel like adapting the generation to existing jigsaw blocks is the right call since their current implementation has so many issues (and it would be an excuse to get rid of all the iron doors and other annoying bits). I could also see nether fortresses being adapted to jigsaw implementation, the main thing they would need to add is a special terminus jigsaw block which fills each column in a specified region downwards with a specified block until it hits terrain, which is something I've wanted anyway (they could even convert desert temples to jigsaw if they did this). But all in all it certainly wouldn't be trivial.

⚠️ Please do not add Affected Versions to resolved reports.

Have a look at the Resolution and the comments to see why this ticket has been resolved. If you think this ticket has been resolved erroneously you can contact the Mojira staff on Discord or Reddit.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

clamlol

(Unassigned)

Confirmed

Structures

23w45a, 23w46a, 1.20.3 Pre-Release 1

Retrieved