mojira.dev
MC-312735

End cities generate 1 block too low

End cities generates 1 block lower than the terrain, cause weird air surroundings always generate around it.

Steps to reproduce

  1. Use seed 12345 in 26.3 or 26.4 snapshot 4,

    /execute in the_end run tp @s 712 65 -1219
  2. Use seed 12345 in 1.12.2, get into the end dimension and

    /tp @s 702 65 -1198

Expected result

On both versions, end cities will generate on the terrain, not 1 block lower than terrain.

Actual result

In 1.13-26.4 snapshot 4 (more exactly, 18w06a-26.4 snapshot 4), end cities generated 1 block lower than the terrain and generated air surroundings around them (in no structures world the terrain won’t be 1 block lower in the middle)

In 1.12.2, they generate exactly on the terrain, not 1 block lower.

Analysis

End cities' start height use the lowest terrain height of 4 corners:

return new BlockPos(k, getMinCornerHeight(context, k, l, i, j), l);

And getMinCornerHeight()use getHeightInGround() instead of getHeightOnGround():

chunkGenerator.getHeightInGround(x,     z,      WORLD_SURFACE_WG, ...)
chunkGenerator.getHeightInGround(x,     z+j,    WORLD_SURFACE_WG, ...)
chunkGenerator.getHeightInGround(x+i,   z,      WORLD_SURFACE_WG, ...)
chunkGenerator.getHeightInGround(x+i,   z+j,    WORLD_SURFACE_WG, ...)

getHeightInGround() use the highest terrain block’s pos, will make the structure sink 1 block into the terrain instead of on the terrain.

This will make the shulkers at the entrance of end city have a higher chance to stuck in blocks and teleport away.

What’s worse, due to the lowest starting height of end cities is Y=60:

return blockPos.getY() < 60
        ? Optional.empty()
        : Optional.of(new Structure.StructurePosition(blockPos, collector -> this.addPieces(...)));

And many places in end_midlands biome or end_highlands biome is at around Y=60, end cities being 1 block lower will make original Y=60 end cities sink to Y=59 and fail to generate, which makes end cities generate less after 1.12.

Attachments

Comments 3

Seed 6983438112510666596 at -12760, -5416 has an end city in 1.12.2 at Y=60, and it won’t generate in 1.13+ due to the height lower down to Y=59.

Most Y61+ end cities in 1.12.2 still generate in 1.13+ at the same place, but one block lower.

COMETC2021A1

(Unassigned)

Unconfirmed

26.3, 26.4 Snapshot 4

Retrieved