mojira.dev
MC-265371

Dungeons can generate without a spawner if intersecting another structure

If a block in the #features_cannot_replace tag is already occupying the central spot in a dungeon, the dungeon spawner will fail to generate and an error (Failed to fetch mob spawner entity at (x, y, z)) will be logged. Furthermore, because the dungeon chests are generated before the spawner, it is possible that one of them will be placed in the middle of the dungeon and act as the spawner inhibitor; the placement algorithm, which can place a chest in any location adjacent to a solid block, makes this possible if another structure (such as a mineshaft, stronghold or even another dungeon) is providing additional unreplaceable blocks. There are several ways to fix or minimize this bug:

  1. Firstly, dungeons should not be able to intersect other structures at all. (MC-186343, MC-125006, MC-211255, MC-221960, etc).

  2. Then, if this cannot be helped, the spawner should generate before the chests so that its placement only fails if the intersecting structure itself is obstructing it.

  3. If it is still decided for whatever reason that the chests should generate first, then their placement should fail outright or be moved to a different location if they would be placed in the middle of the dungeon.

  4. Failing all that, the console message should be changed to a warning and this issue should be resolved as fixed or intended.

Below is an example of the bug. Create a new world with seed -3641748469545596142, go into spectator mode and run /teleport @s 245 -2 -276.

[media]

See also this post on the Mojira Discord for context.

Attachments

Comments 5

So the main feature of a dungeon not spawning due to an oversight is intentional? That seems wrong.

Either all occurances of the oversight should be corrected, or the spawner guarenteed to get placed.

This resolution also sets a precedent for console errors being intentional, which raises the question of what the difference is between "warning" messages and "error" messages.

I can't help but feel like the impetus for this resolution runs along the lines of "Yes, it makes sense that our implementation would cause things like this to happen. Little quirks like this are what make the game what it is, so we regard them as features." This sort of developer-centric thinking is frustrating for players because it doesn't address why their expectations were wrong and their gameplay negatively impacted. Also, since that logic could be applied to basically any issue, it acts as a deterrent to issue reporting itself.

All told, these "out of the blue" WAIs are very frustrating and feel like they were done flippantly or in error. A comment explaining why the issue is intended would be much appreciated; if this would be too much of a hassle, it seems better to just leave the issue open.

Thank you @unknown for reopening this.

Affects 25w05a.
Seed: "-2665784722939312334"
Position: "/execute in minecraft:overworld run tp @s -16709.53 -18.22 -592.20 -730.35 33.00"

Oh that's fascinating: two dungeons, but only one spawner. Nice find!

[media]

clamlol

(Unassigned)

Confirmed

Platform

Normal

Structures, World generation

1.20.1, 1.20.2 Pre-Release 3, 23w41a, 24w04a, 1.21, 25w06a

Retrieved