mojira.dev
MC-3347

Ores, dirt and maybe caves and structures only generate until Y 128 in stone

When I generate a superflatworld with very high ground (like "Miners dream") I can see that ores, maybe caves (haven't found any there) and dirt only generate up to y: 128, the old height of maps back then before Anvil map format.

Attachments

Comments 7

Can confirm. Caves do not generate, though abandoned mineshafts do below 128 as well.

I've been reading the world/map generation code a bit lately, and indeed, for the generation part, it only works on the "old" lower 128 levels. For example, various loops going through vertical axis only check upto or downfrom 127.

However, the fix to this seems to be rather laborous, as at least at first look, seems the upper 128 blocks are stored separate from the lower 128 blocks, and trying to scan through full span might make many routines quite a bit more complex or slower. Also, many a vertical coordinate value is handled as Java's byte, which is signed and limited to +127 (in the positive side). (For example, certain methods add 128 to block index as they step in Z-axis (the other horizontal), indicating that the array of blocks has only 128 vertical blocks per horizontal location.)

This is also likely the reason why Nether has its top bedrock at the old level, too. I.e. the top half of Nether is empty and unaccessible (in survival).

When Mojang added the upper 128 blocks for building things, they did it the quick and dirty -way. I can't blame them though.

Is this still a concern in the latest Minecraft version 14w04b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Is this still a concern in the latest Minecraft version 14w30c? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Both Gravel and Dirt are spawning above 128 now, ores don't because they just do not generate that high. Did not check about caves etc.

As of 18w05a, it seems that caves are capable of generating above y=128 on Customized worlds (tested by setting Biome Depth Offset to its maximum value). However, they still never seem to actually break the surface at y=255. Should a separate bug report be made for this?

Meta

(Unassigned)

Confirmed

Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09c, ..., Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w38b, Minecraft 13w38c, Minecraft 13w39a

Retrieved