Miniature Siege Defense

Build an automated tabletop tower defense game in vanilla Minecraft where glowing arcane towers fire laser beams at tiny marching husks along an S-shaped path.

Java EditionMobs & PetsHard24 commandsTested on a real 26.2 & 26.3 server
Tiny glowing mobs march along a miniature stone path while automated towers zap them with cyan beams. Download the GIF Video & GIF © www.9minecraft.net

Custom MobsMedievalMysticCyanGoldBlueMini-gameMap MakingItem displaysSummoned mobsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

Miniature Siege Defense transforms a patch of ground into a live tabletop tower defense board using vanilla commands and entity scale attributes. Tiny glowing husks march out of a crimson spawn portal and follow a winding S-shaped path toward a floating beacon crystal while three automated arcane towers track and zap them with bright cyan laser beams.

Everything runs automatically without mods or data packs. The towers lock onto the nearest invader in range, fire continuous particle rays and lightning bursts, and defeat the miniature monsters in pops of soul fire flame before they reach the goal.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /scoreboard objectives add c9_st dummy
  3. /fill ~-9 ~-1 ~-7 ~9 ~-1 ~7 mossy_stone_bricks
  4. /fill ~-8 ~-1 ~-5 ~-3 ~-1 ~-3 mud_bricks
  5. /fill ~-5 ~-1 ~-3 ~-3 ~-1 ~5 mud_bricks
  6. /fill ~-5 ~-1 ~3 ~2 ~-1 ~5 mud_bricks
  7. /fill ~ ~-1 ~-5 ~2 ~-1 ~5 mud_bricks
  8. /fill ~ ~-1 ~-5 ~8 ~-1 ~-3 mud_bricks
  9. /setblock ~-2 ~ ~ polished_deepslate_wall
  10. /summon marker ~ ~ ~ {Tags:["c9_all","c9_ctrl"]}

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

  1. /scoreboard players add @e[tag=c9_ctrl] c9_t 1
  2. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run summon item_display ~-2 ~1.7 ~ {Tags:["c9_all","c9_tower"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:conduit"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]}}
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run summon item_display ~-6.5 ~1.7 ~1 {Tags:["c9_all","c9_tower"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:conduit"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]}}
  4. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run summon item_display ~4 ~1.7 ~ {Tags:["c9_all","c9_tower"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:conduit"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]}}
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run summon item_display ~7 ~1.2 ~-4 {Tags:["c9_all","c9_goal"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.2f,1.2f,1.2f]}}
  6. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 18.. run summon husk ~-7.5 ~ ~-4 {Tags:["c9_all","c9_mob"],NoAI:1b,Silent:1b,Glowing:1b,attributes:[{id:"minecraft:scale",base:0.45d}],equipment:{head:{id:"minecraft:golden_helmet",count:1}}}
  7. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 18.. run scoreboard players set @e[tag=c9_ctrl] c9_t 2
  8. /execute as @e[tag=c9_mob] unless score @s c9_st matches 1.. run scoreboard players set @s c9_st 1
  9. /execute as @e[tag=c9_mob] at @s run scoreboard players add @s c9_t 1
  10. /execute as @e[tag=c9_mob,scores={c9_t=1..28}] at @s run tp @s ~0.12 ~ ~ facing ~1 ~ ~
  11. /execute as @e[tag=c9_mob,scores={c9_t=29..95}] at @s run tp @s ~ ~ ~0.12 facing ~ ~ ~1
  12. /execute as @e[tag=c9_mob,scores={c9_t=96..138}] at @s run tp @s ~0.12 ~ ~ facing ~1 ~ ~
  13. /execute as @e[tag=c9_mob,scores={c9_t=139..205}] at @s run tp @s ~ ~ ~-0.12 facing ~ ~ ~-1
  14. /execute as @e[tag=c9_tower] at @s facing entity @e[tag=c9_mob,distance=..7,sort=nearest,limit=1] feet positioned ^ ^ ^1.2 run particle dust{color:[0.0,1.0,1.0],scale:1.6} ^ ^ ^1.2 0.45 0.35 0.45 0 18 force

How it works

Frames from the test run

Miniature Siege Defense - frame 1Miniature Siege Defense - frame 2Miniature Siege Defense - frame 3

Recorded on our own test server: 60 frames at about 9.8 fps. Our image check saw: A top-down view of a stone brick grid with an S-shaped path where tiny glowing entities walk toward a golden glowing crystal while three cyan-outlined towers shoot blue particle beams at them.

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. Stand at the center of a flat open area at least 20x20 blocks wide.
  2. Run each of the 10 setup commands in chat once to build the mossy stone board, the S-shaped mud brick path, and the control marker.
  3. Place 14 repeating command blocks in a line or column nearby and set all of them to Always Active.
  4. Paste one loop command into each repeating command block in order from 1 to 14.
  5. Add one extra repeating command block with <code>/kill @e[tag=c9_mob,scores={c9_t=185..}]</code> so husks dissolve in the laser beams before reaching the beacon crystal.

Use it with real players

To let real players place towers during a match, summon a tower wherever a player drops a named conduit item using /execute at @e[type=item,nbt={Item:{id:"minecraft:conduit"}}] run summon item_display ~ ~1.7 ~ {Tags:["c9_all","c9_tower"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:conduit"}} followed by killing the dropped item entity.

Remove it again 5 commands

  1. /kill @e[tag=c9_all]
  2. /scoreboard objectives remove c9_t
  3. /scoreboard objectives remove c9_st
  4. /fill ~-9 ~-1 ~-7 ~9 ~2 ~7 air
  5. /fill ~-9 ~-1 ~-7 ~9 ~-1 ~7 grass_block

FAQ

Why are the miniature husks wearing golden helmets?

The helmets make them easy to spot from a top-down camera angle and prevent them from catching fire if you play the board during daytime.

How do I change the size or speed of the invaders?

Adjust the <code>minecraft:scale</code> base value in loop command 6 to change their size, or alter the step distance in the teleport commands (0.12 blocks per tick) to speed them up.

Commands used

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

Similar creations

Join 9Minecraft News & Guides