Procedural Mountain Builder

Watch a jagged, snow-capped mountain range sculpt itself layer-by-layer from flat grass using autonomous carving markers and geological strata.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
A procedurally generated Minecraft mountain displays distinct geological layers of deepslate, stone, and snow-capped peaks. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresNatureIceWhiteBlackBlueBuilding ToolMap MakingLearningBlock building (fill/setblock/clone)Rotation math21+ commands

Generating natural-looking terrain usually requires external tools or world generators, but this command creation builds a custom mountain range right before your eyes in real time. Using a set of autonomous tectonic markers that climb and wander inward as they rise, the system layers deep slate, stone, andesite, and snow into a rugged multi-peak mountain.

As the geological layers stack upward, glowing dust particles and smoke trace the active elevation plane, making it look like a 3D printer for Minecraft landscapes. Even the surrounding base automatically blends into gravel, coarse dirt, and moss so the mountain sits naturally on the stage.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard objectives add c9_h dummy
  3. /scoreboard players set #tick c9_tick 0
  4. /scoreboard players set #h c9_h 0
  5. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 stone replace grass_block
  6. /spreadplayers ~ ~ 3 13 under 80 false @e[tag=c9_m]
  7. /summon marker ~ ~ ~ {Tags:["c9_m","c9_main"]}
  8. /summon marker ~4 ~ ~-3 {Tags:["c9_m","c9_sub"]}
  9. /summon marker ~-5 ~ ~2 {Tags:["c9_m","c9_sub"]}
  10. /summon marker ~2 ~ ~5 {Tags:["c9_m","c9_ridge"]}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /execute if score #h c9_h matches ..21 run scoreboard players add #tick c9_tick 1
  2. /execute if score #tick c9_tick matches 5.. run scoreboard players add #h c9_h 1
  3. /execute if score #tick c9_tick matches 5.. run execute as @e[tag=c9_m] at @s run tp @s ~ ~1 ~
  4. /execute if score #tick c9_tick matches 5.. run execute as @e[tag=c9_sub] at @s facing ~ ~ ~ run tp @s ^ ^ ^0.35
  5. /execute if score #tick c9_tick matches 5.. run execute as @e[tag=c9_ridge] at @s facing ~ ~ ~ run tp @s ^0.2 ^ ^0.4
  6. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 1..5 as @e[tag=c9_m] at @s run fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 deepslate replace air
  7. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 1..8 as @e[tag=c9_main] at @s run fill ~-7 ~-1 ~-3 ~7 ~-1 ~3 tuff replace air
  8. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 4..11 as @e[tag=c9_m] at @s run fill ~-4 ~-1 ~-4 ~4 ~-1 ~4 stone replace air
  9. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 9..15 as @e[tag=c9_m] at @s run fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 andesite replace air
  10. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 14..18 as @e[tag=c9_m] at @s run fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 calcite replace air
  11. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 17..20 as @e[tag=c9_m] at @s run fill ~-1 ~-1 ~-1 ~1 ~ ~1 snow_block replace air
  12. /execute if score #tick c9_tick matches 5.. if score #h c9_h matches 21 as @e[tag=c9_main] at @s run setblock ~ ~ ~ powder_snow
  13. /execute if score #h c9_h matches 1..20 as @e[tag=c9_m] at @s run particle dust{color:[0.3,0.85,1.0],scale:1.8} ~ ~0.5 ~ 3.5 0.2 3.5 0 12 force
  14. /execute if score #tick c9_tick matches 5.. run scoreboard players set #tick c9_tick 0

How it works

Frames from the test run

Procedural Mountain Builder - frame 1Procedural Mountain Builder - frame 2Procedural Mountain Builder - frame 3

Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A multi-peaked blocky mountain layered with deepslate at the bottom, stone and andesite in the middle, and white calcite/snow at the top is being generated with blue particles.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Find or build a flat area at least 35x35 blocks wide with clear air above it.
  2. Stand in the exact centre of your build area and run all of the setup commands in chat one by one.
  3. Place a line or stack of 14 repeating command blocks set to Always Active somewhere nearby (or use a chain starting from one repeating block).
  4. Paste each loop command into its own command block in order from 1 to 14.
  5. Watch the cyan scan plane rise as the four tectonic markers carve and stack the mountain layers up to 21 blocks high.
  6. To generate a different mountain shape, run the remove commands and summon the <code>c9_sub</code> and <code>c9_ridge</code> markers at different starting coordinates.

Use it with real players

To let players trigger mountains wherever they throw a snowball or place a beacon, summon the four c9_m markers relative to the snowball or player position instead of the fixed stage centre, and replace facing ~ ~ ~ in loop commands 4 and 5 with facing entity @e[tag=c9_main,limit=1] eyes so the sub-peaks always taper toward the main peak wherever it was spawned.

Remove it again 5 commands

  1. /kill @e[tag=c9_m]
  2. /scoreboard objectives remove c9_tick
  3. /scoreboard objectives remove c9_h
  4. /fill ~-16 ~ ~-16 ~16 ~24 ~16 air
  5. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block

FAQ

Can I change how tall or wide the mountain builds?

Yes. Increase the maximum height check in the first loop command (currently <code>..21</code>) and adjust the <code>#h</code> score ranges on the <code>/fill</code> commands to stretch each rock layer across more blocks.

Why does the command use multiple markers instead of one?

A single marker only builds a symmetrical pyramid. Using four offset markers that drift inward at different angles creates realistic ridges, valleys, and multiple peaks as their square layers overlap.

Commands used

/execute/fill/particle/scoreboard/setblock/spreadplayers/summon/tp

Similar creations

Join 9Minecraft News & Guides