End cities generates 1 block lower than the terrain, cause weird air surroundings always generate around it.
Steps to reproduce
Use seed 12345 in 26.3 or 26.4 snapshot 4,
/execute in the_end run tp @s 712 65 -1219Use 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.