Build an automated PvZ-style garden defense where animated melon turrets fire glowing pea volleys across a checkered lawn to stop marching zombie waves.
SimulationsNatureCuteGreenYellowMini-gameMap MakingBlock displaysItem displaysSmooth animation (interpolation)Riding & passengersSummoned mobsBlock building (fill/setblock/clone)21+ commands
The Botanical Defense Grid turns your Minecraft world into a live tower defense battlefield inspired by classic lawn defense games. Across a 3-lane checkered lawn, rows of glowing melon turrets automatically detect and fire bright green pea projectiles at relentless waves of helmeted zombies marching toward your flowerbeds.
Each turret smoothly recoils and expands using display entity transformations every time it shoots, while impacts trigger lime particle bursts and sound effects. Everything runs automatically using a single scoreboard clock and tagged entities.
/scoreboard objectives add c9_t dummy/fill ~-9 ~-1 ~-5 ~9 ~-1 ~5 lime_concrete/fill ~-9 ~-1 ~-3 ~9 ~-1 ~-1 green_concrete/fill ~-9 ~-1 ~1 ~9 ~-1 ~3 green_concrete/fill ~-10 ~ ~-5 ~-10 ~ ~5 oak_fence/fill ~9 ~-1 ~-5 ~10 ~-1 ~5 coarse_dirt/summon marker ~ ~ ~ {Tags:["c9_m"]}/summon block_display ~-8 ~ ~-4 {Tags:["c9_p","c9_e"],Glowing:1b,glow_color_override:65280,block_state:{Name:"minecraft:melon"},transformation:{translation:[-0.35f,0.0f,-0.35f],scale:[0.7f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},interpolation_duration:4,Passengers:[{id:"minecraft:item_display",Tags:["c9_e"],item:{id:"minecraft:Golden_Carrot"},transformation:{translation:[0.35f,0.5f,0.0f],scale:[0.6f,0.6f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/summon block_display ~-8 ~ ~ {Tags:["c9_p","c9_e"],Glowing:1b,glow_color_override:65280,block_state:{Name:"minecraft:melon"},transformation:{translation:[-0.35f,0.0f,-0.35f],scale:[0.7f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},interpolation_duration:4,Passengers:[{id:"minecraft:item_display",Tags:["c9_e"],item:{id:"minecraft:Golden_Carrot"},transformation:{translation:[0.35f,0.5f,0.0f],scale:[0.6f,0.6f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/summon block_display ~-8 ~ ~4 {Tags:["c9_p","c9_e"],Glowing:1b,glow_color_override:65280,block_state:{Name:"minecraft:melon"},transformation:{translation:[-0.35f,0.0f,-0.35f],scale:[0.7f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},interpolation_duration:4,Passengers:[{id:"minecraft:item_display",Tags:["c9_e"],item:{id:"minecraft:Golden_Carrot"},transformation:{translation:[0.35f,0.5f,0.0f],scale:[0.6f,0.6f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/scoreboard players add @e[tag=c9_m] c9_t 1/execute if score @e[tag=c9_m,limit=1] c9_t matches 15 run execute at @e[tag=c9_p] run summon item_display ~0.6 ~0.45 ~ {Tags:["c9_b","c9_e"],Glowing:1b,glow_color_override:65280,item:{id:"minecraft:slime_ball"},transformation:{translation:[0f,0f,0f],scale:[0.5f,0.5f,0.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score @e[tag=c9_m,limit=1] c9_t matches 15 run execute at @e[tag=c9_p] run data merge entity @s {start_interpolation:0,transformation:{translation:[-0.45f,0.0f,-0.45f],scale:[0.9f,0.5f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score @e[tag=c9_m,limit=1] c9_t matches 20 run execute at @e[tag=c9_p] run data merge entity @s {start_interpolation:0,transformation:{translation:[-0.35f,0.0f,-0.35f],scale:[0.7f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score @e[tag=c9_m,limit=1] c9_t matches 30 run summon zombie ~9 ~ ~-4 {Tags:["c9_z","c9_e"],NoAI:1b,Silent:1b,Health:10f,armor_items:[{},{},{},{id:"minecraft:leather_helmet",components:{"minecraft:dyed_color":16733440}}]}/execute if score @e[tag=c9_m,limit=1] c9_t matches 50 run summon zombie ~9 ~ ~ {Tags:["c9_z","c9_e"],NoAI:1b,Silent:1b,Health:10f,armor_items:[{},{},{},{id:"minecraft:iron_helmet"}]}/execute if score @e[tag=c9_m,limit=1] c9_t matches 70 run summon zombie ~9 ~ ~4 {Tags:["c9_z","c9_e"],NoAI:1b,Silent:1b,Health:10f,armor_items:[{},{},{},{id:"minecraft:leather_helmet",components:{"minecraft:dyed_color":16733440}}]}/execute if score @e[tag=c9_m,limit=1] c9_t matches 75.. run scoreboard players set @e[tag=c9_m] c9_t 0/execute as @e[tag=c9_b] at @s run tp @s ~0.45 ~ ~/execute at @e[tag=c9_b] run particle dust{color:[0.2,1.0,0.2],scale:1.0} ~ ~ ~ 0.05 0.05 0.05 0 2/execute as @e[tag=c9_b] at @s if entity @e[tag=c9_z,distance=..1.2] run particle item{item:{id:"minecraft:slime_block"}} ~ ~0.5 ~ 0.2 0.2 0.2 0.1 12/execute as @e[tag=c9_b] at @s if entity @e[tag=c9_z,distance=..1.2] run damage @e[tag=c9_z,distance=..1.2,limit=1] 4 magic/execute as @e[tag=c9_b] at @s if entity @e[tag=c9_z,distance=..1.2] run kill @s/execute as @e[tag=c9_z] at @s run tp @s ~-0.07 ~ ~ 90 0setup #8 Summons a glowing melon <code>block_display</code> tagged <code>c9_p</code> with a golden carrot barrel passenger to act as our botanical turret in the first lane.loop #2 Every cycle at tick 15, each turret spawns a glowing slimeball <code>item_display</code> projectile tagged <code>c9_b</code> right in front of its barrel.loop #3 Animates the turret squishing down and widening via display entity <code>transformation</code> and <code>start_interpolation:0</code> whenever it fires a shot.loop #5 Spawns a silent, NoAI zombie wearing an orange-dyed leather cone helmet at the right side of the lawn.loop #12 Checks if a pea projectile is within 1.2 blocks of a zombie and deals 4 points of magic damage before the next command deletes the projectile.


Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A striped green lawn features three glowing melon turrets on the left firing projectiles at waves of helmeted zombies walking from the right.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To let players plant their own turrets during gameplay, remove the last three setup commands and instead execute the turret summon command at a thrown snowball or dropped melon seed item: /execute at @e[type=item,nbt={Item:{id:"minecraft:melon_seeds"}}] run summon block_display ~ ~ ~ ... followed by killing the seed item.
/kill @e[tag=c9_e]/kill @e[tag=c9_m]/scoreboard objectives remove c9_t/fill ~-10 ~ ~-5 ~10 ~ ~5 air/fill ~-10 ~-1 ~-5 ~10 ~-1 ~5 grass_blockCopy any of the last three setup commands and change the X or Z coordinates to place a turret on any tile of the lawn. All turrets tagged c9_p will automatically fire together.
They are spawned with NoAI:1b and moved 0.07 blocks per tick using /tp in the last loop command, keeping them strictly inside their assigned lawn lanes.
/damage/data/execute/fill/kill/particle/scoreboard/summon/tp
▶Automated Botanical Lane DefenseSimulationsHard24 cmds
▶Tidal Wave Tsunami Breakwater SimulationSimulationsHard24 cmds
▶Volcanic Caldera Eruption & Pyroclastic FlowSimulationsHard24 cmds
▶Microscopic Bacteriophage Viral InjectionSimulationsHard24 cmds
▶Arcade Ghost AI Maze in Vanilla MinecraftSimulationsHard24 cmds