Since I've recently been working on some Minecraft world gen stuff I came across Minecraft's internal height maps. I mainly
needed them for a few placement modifiers like the surface_relative_threshold_filter
.
I couldn't find any documentation on the different heightmap types, so I decided to dig into Minecraft's code and write
a small program that can render them. Here's a small overview:
Minecraft has 6 different heightmap types:
WORLD_SURFACE_WG
WORLD_SURFACE
OCEAN_FLOOR_WG
OCEAN_FLOOR
MOTION_BLOCKING
MOTION_BLOCKING_NO_LEAVES
The heightmaps with the _WG
suffix are used for world generation and aren't present after a chunk has been generated.
They're pretty much the same as the ones without the suffix. Of course, some data might still be missing in the _WG
heightmaps since they're still being generated.
The WORLD_SURFACE
heightmap stores the height of the highest non-air block in each block-column.
Same as WORLD_SURFACE
but all non motion-blocking blocks (water, lava, flowers, etc.) are ignored.
Same as OCEAN_FLOOR
but fluid blocks aren't ignored.
Same as MOTION_BLOCKING
but leaves are also ignored.
Here are some examples of the different heightmaps (click the arrows):
Since all non ocean floor heightmaps are the same for this example, I only included the ocean floor and world surface heightmaps.
Screenshot
World surface
Ocean floor
Seeing the difference between WORLD_SURFACE
and MOTION_BLOCKING
might be hard on some monitors since only a few pixels
have a 1 gray level difference. You can open them in full screen and switch between them to see the difference better.
Literally explained in the second paragraph. One is for world gen, the other one is used after the chunks have been generated,