Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Heightmap: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 7: Line 7:
The last four heightmaps are based on a property called motion blocking. This is defined as follows:
The last four heightmaps are based on a property called motion blocking. This is defined as follows:


* [[Minecraft:Cobweb|Cobwebs]] and [[Minecraft:Bamboo Sapling|bamboo saplings]] are considered not motion blocking.
* [[Minecraft:Cobweb]]s and [[Minecraft:bamboo sapling]]s are considered not motion blocking.
* The block must be "solid". On [[Minecraft:Java Edition]], this is defined using the [[Minecraft:Legacy solid]] property. Note that this is not the same as having a collision box. Some blocks like snow [[Minecraft:Azalea|azaleas]] are not considered solid while having a collision box, and other blocks like [[Minecraft:Banner|banners]] are considered solid while having no collision box.  
* The block must be "solid". On {{JE}}, this is defined using the [[Minecraft:Legacy solid]] property. Note that this is not the same as having a collision box. Some blocks like snow [[Minecraft:azalea]]s are not considered solid while having a collision box, and other blocks like [[Minecraft:banner]]s are considered solid while having no collision box.


== Types ==
== Types ==
Line 17: Line 17:
* <code>OCEAN_FLOOR</code>: Stores the Y-level of the highest block whose [[Minecraft:material]] blocks motion. Used only on the server side.
* <code>OCEAN_FLOOR</code>: Stores the Y-level of the highest block whose [[Minecraft:material]] blocks motion. Used only on the server side.
* <code>OCEAN_FLOOR_WG</code>: Stores the Y-level of the highest block whose material blocks motion. Used only during world generation.
* <code>OCEAN_FLOOR_WG</code>: Stores the Y-level of the highest block whose material blocks motion. Used only during world generation.
* <code>MOTION_BLOCKING</code>: Stores the Y-level of the highest block whose material blocks motion or blocks that contains a fluid ([[Minecraft:water]], [[Minecraft:lava]], or [[Minecraft:waterlogged]] blocks).  
* <code>MOTION_BLOCKING</code>: Stores the Y-level of the highest block whose material blocks motion or blocks that contains a fluid ([[Minecraft:water]], [[Minecraft:lava]], or [[Minecraft:waterlogged]] blocks).
* <code>MOTION_BLOCKING_NO_LEAVES</code>: Stores the Y-level of the highest block whose material blocks motion, or blocks that contains a fluid (water, lava, or waterlogged blocks), except various [[Minecraft:leaves]]. Used only on the server side, e.g. for pillager patrol spawning.
* <code>MOTION_BLOCKING_NO_LEAVES</code>: Stores the Y-level of the highest block whose material blocks motion, or blocks that contains a fluid (water, lava, or waterlogged blocks), except various [[Minecraft:leaves]]. Used only on the server side, e.g. for pillager patrol spawning.



Latest revision as of 11:07, 7 July 2026

Template:Missing information

Heightmaps are maps to store the Y-level of the highest block at each horizontal coordinate. They are stored in chunk files and used for various game calculations.

Motion blocking

The last four heightmaps are based on a property called motion blocking. This is defined as follows:

Types

Several different heightmaps check and store highest block of different types, and are used for different purposes. Template:IN, there are six heightmap types:

  • WORLD_SURFACE: Stores the Y-level of the highest non-air (all types of air) block.
  • WORLD_SURFACE_WG: Stores the Y-level of the highest non-air (all types of air) block. Used only during world generation.
  • OCEAN_FLOOR: Stores the Y-level of the highest block whose Minecraft:material blocks motion. Used only on the server side.
  • OCEAN_FLOOR_WG: Stores the Y-level of the highest block whose material blocks motion. Used only during world generation.
  • MOTION_BLOCKING: Stores the Y-level of the highest block whose material blocks motion or blocks that contains a fluid (Minecraft:water, Minecraft:lava, or Minecraft:waterlogged blocks).
  • MOTION_BLOCKING_NO_LEAVES: Stores the Y-level of the highest block whose material blocks motion, or blocks that contains a fluid (water, lava, or waterlogged blocks), except various Minecraft:leaves. Used only on the server side, e.g. for pillager patrol spawning.

Usage

Heightmaps are used for various in-game calculations. For example, a lightning rod can only be triggered when there is no non-air block above it. Therefore, the game compares the Y-level of lightning rod with heightmap WORLD_SURFACE to know if there are non-air blocks above it.

Heightmaps of both server side and client side can be seen in Minecraft:debug screen. The "CH" line is the value in client side heightmaps at the player's current X/Z coordinates. The "SH" line is the server side value in heightmaps at the player's current X/Z coordinates. In the two lines:

  • S means WORLD_SURFACE
  • O means OCEAN_FLOOR
  • M means MOTION_BLOCKING
  • ML means MOTION_BLOCKING_NO_LEAVES

Template:Cmd can change the execution position of the command to one block above the Y-level stored in the specified heightmap. WORLD_SURFACE_WG and OCEAN_FLOOR_WG cannot be used in this command.

Navigation

Template:Navbox Java Edition technical

Minecraft:fr:Champ de hauteur Minecraft:ja:高度マップ Minecraft:pt:Heightmap Minecraft:zh:高度图