Pocket Terrarium Generator

Build an automated pocket terrarium that carves a deep lava cavern with rotating laser beams, magma veins, a glass ring, and a floating azalea island.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Rotating cyan lasers sweep over a glass-enclosed terrarium with a flowering tree, magma blocks, and lava. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresNatureFireTechnologyCyanOrangeGreenDecorationBuilding ToolMap MakingBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

The Pocket Terrarium Generator transforms a flat patch of grass into a glowing cross-section biome slice right in front of you. Starting from a levitating emerald seed crystal, three rotating sea_lantern laser beams sweep around the center to raise a circular cyan glass containment collar, carve out a deep deepslate cavern lined with magma veins, and flood the basin with bubbling lava.

Once the underground lava lake settles, a floating moss island rises above the glowing seed core and sprouts a flowering azalea tree, while the laser beams and cyan particle halo continue orbiting overhead.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /kill @e[tag=c9_ent]
  3. /fill ~-9 ~-6 ~-9 ~9 ~-2 ~9 deepslate
  4. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block
  5. /fill ~-9 ~ ~-9 ~9 ~20 ~9 air
  6. /summon marker ~ ~ ~ {Tags:["c9_ent","c9_core"]}
  7. /summon block_display ~ ~4 ~ {Tags:["c9_ent","c9_beam"],Rotation:[0f,34f],billboard:"fixed",teleport_duration:1,Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.08f,-0.08f,0f],scale:[0.16f,0.16f,7.5f]}}
  8. /summon block_display ~ ~4 ~ {Tags:["c9_ent","c9_beam"],Rotation:[120f,34f],billboard:"fixed",teleport_duration:1,Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.08f,-0.08f,0f],scale:[0.16f,0.16f,7.5f]}}
  9. /summon block_display ~ ~4 ~ {Tags:["c9_ent","c9_beam"],Rotation:[240f,34f],billboard:"fixed",teleport_duration:1,Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.08f,-0.08f,0f],scale:[0.16f,0.16f,7.5f]}}
  10. /summon block_display ~ ~-0.2 ~ {Tags:["c9_ent","c9_seed"],Glowing:1b,glow_color_override:65408,brightness:{sky:15,block:15},block_state:{Name:"minecraft:emerald_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,-0.4f,-0.4f],scale:[0.8f,0.8f,0.8f]}}

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

  1. /scoreboard players add @e[tag=c9_core] c9_tick 1
  2. /execute as @e[tag=c9_beam] at @s run tp @s ~ ~ ~ ~7 ~
  3. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 1..18 as @e[tag=c9_beam] at @s rotated ~ 0 positioned ^ ^ ^7.5 run setblock ~ ~-4 ~ cyan_stained_glass
  4. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 19..36 as @e[tag=c9_beam] at @s rotated ~ 0 positioned ^ ^ ^7.5 run setblock ~ ~-3 ~ light_blue_stained_glass
  5. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 12..30 as @e[tag=c9_beam] at @s rotated ~ 0 positioned ^ ^ ^4.0 run fill ~-2 ~-8 ~-2 ~2 ~-5 ~2 air
  6. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 18 run fill ~-3 ~-4 ~-3 ~3 ~-1 ~3 air
  7. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 22..40 as @e[tag=c9_beam] at @s rotated ~ 0 positioned ^ ^ ^6.2 run fill ~ ~-6 ~ ~ ~-5 ~ magma_block
  8. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 42 run fill ~-6 ~-4 ~-6 ~6 ~-3 ~6 lava replace air
  9. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 48 run fill ~-2 ~1 ~-2 ~2 ~1 ~2 moss_block
  10. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 54 run fill ~ ~2 ~ ~ ~5 ~ oak_log
  11. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 60 run fill ~-2 ~5 ~-2 ~2 ~7 ~2 flowering_azalea_leaves[persistent=true] keep
  12. /execute as @e[tag=c9_beam] at @s positioned ^ ^ ^6.8 run particle flame ~ ~ ~ 0.18 0.18 0.18 0.03 4 force
  13. /execute as @e[tag=c9_beam] at @s rotated ~ 0 positioned ^ ^ ^7.5 run particle dust{color:[0.0,1.0,1.0],scale:1.8} ~ ~3 ~ 0.1 0.1 0.1 0 3 force
  14. /execute if score @e[tag=c9_core,limit=1] c9_tick matches 42.. run particle lava ~ ~-2.5 ~ 3.5 0.4 3.5 0.05 8 force

How it works

Frames from the test run

Pocket Terrarium Generator - frame 1Pocket Terrarium Generator - frame 2Pocket Terrarium Generator - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: Three rotating cyan laser beams sweep over a glass-enclosed lava and magma pit surrounding a central mossy island with a flowering azalea tree and a floating blue particle ring.

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 an open, flat grassy area with at least a 20x20 block footprint and clear sky above.
  2. Stand at the exact center where you want the terrarium to appear and run the 10 setup commands in order from chat or impulse command blocks.
  3. Place 14 Repeating, Always Active command blocks nearby (for example underneath or beside the area) and paste one loop command into each block.
  4. Watch as the glass containment ring builds, the three laser beams carve the cavern and magma veins, and the lava lake, moss island, and azalea tree form.
  5. To reset and replay the animation at any time, run the setup commands again or use the remove commands to restore the grass.

Use it with real players

To let a player trigger a terrarium wherever they stand, replace the fixed ~ ~ ~ coordinates in the setup commands with execute at @p run ..., give the player a named item such as a minecraft:emerald[custom_name={"text":"Terrarium Seed","color":"green"}], and add a loop check that runs the setup at a dropped seed item tagged c9_ent before killing the item.

Remove it again 5 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_tick
  3. /fill ~-9 ~-5 ~-9 ~9 ~-2 ~9 dirt
  4. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block
  5. /fill ~-9 ~ ~-9 ~9 ~12 ~9 air

FAQ

Why does the glass ring stay low instead of forming tall walls?

Keeping the circular glass collar two blocks high leaves the middle open so you have a clear view of the glowing lava lake, magma veins, floating island, and rotating beams without stained glass blocking the cavern.

Can I replay the build sequence without rebuilding the command blocks?

Yes. Run the setup commands again from the stage center to clear the old entities, reset the terrain, and restart the timer from tick 0.

Commands used

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

Similar creations

Join 9Minecraft News & Guides