The bug
minecraft:grass, minecraft:flower_pot, carpets, snow and possibly more blocks generate on the wrong y level if min_y is below 0. (y of wrong level blocks = amount of layers) Basically forgets there are negative y levels.
[media]
How to reproduce
Go to the flat world preset menu
Fill in minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block,minecraft:grass (you can replace grass with flower_pot or white_carpet for the same effect)
Generate the world
❌ The grass generated at y = 4
Code analysis
Using the official 21w08b mojmaps:
net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings
public int getMinBuildHeight() {
return 0;
}
public int getHeight() {
return 256;
}
These are hardcoded to the old limit, multiple things are calculated with that number, including the level height of the blocks like carpets, grass and snow etc(blocks that depend on blocks below it, flower_pot is a weird exception). Best solution is unhardcoding these.
Linked issues
is duplicated by 1
Attachments
Comments 4
This is probably what causes MC-215036.
Wouldn’t this block MC-215036?
Relates to MC-215036.