mojira.dev
MC-214288

Player does not spawn on the surface of the world when min_y is greater than 0

The bug

When creating a (flat) world with min_y greater than 0, the player spawns inside blocks (at the lower layers of the world), rather than on the surface.

How to reproduce

  1. Select Singleplayer → Create New World → More World Options... → Import Settings

  2. Import the

[media]
  1. file

  2. Select Create New World
    → ❌ The player is spawned inside the ground, rather than on the surface of the world

Linked issues

Attachments

Comments 1

I've done a code analysis for one of my issues (MC-217802) using the mojang obfusication maps:

//net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings

public int getMinBuildHeight() {
  return 0;
}
    
public int getHeight() {
  return 256;
}

This hardcoding of getMinBuildHeight() and getHeight() results in this bug

[Mod] markderickson

(Unassigned)

Confirmed

Normal

Custom Worlds

21w05b, 21w06a, 21w07a, 21w10a

21w42a

Retrieved