Trench Warfare Artillery Display

Watch a detailed custom WWI artillery cannon made of block displays automatically recoil, fire arcing shells, and bombard a sandbag trench line with explosions.

Java EditionHolograms & Display EntitiesHard24 commandsTested on a real 26.2 & 26.3 server
A custom Minecraft artillery cannon fires a smoky projectile in an arc toward a fortified trench. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsIndustrialTechnologyFireBlackOrangeYellowDecorationCinematicMap MakingBlock displaysItem displaysArmor standsSmooth animation (interpolation)Riding & passengersBlock building (fill/setblock/clone)Sounds21+ commands

This command creation builds an automated vintage battlefield diorama using custom block display entities. At one end of the field stands a heavy howitzer cannon constructed from netherite, grindstone wheels, and iron carriage struts, aimed directly at an entrenched bunker fortified with sandbags and barbed wire.

Every few seconds, the artillery piece fires a glowing shell along a parabolic trajectory. Using display entity transformation interpolation, the cannon barrel kicks backward with realistic recoil while muzzle flash particles erupt, followed shortly by a fiery detonation at the enemy trench.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-8 ~-1 ~-4 ~8 ~-1 ~4 coarse_dirt
  3. /fill ~4 ~-1 ~-3 ~6 ~-1 ~3 mud
  4. /fill ~3 ~ ~-3 ~3 ~ ~3 sandstone_slab[type=bottom]
  5. /fill ~2 ~ ~-2 ~2 ~ ~2 cobweb
  6. /summon marker ~ ~ ~ {Tags:["c9_all","c9_ctrl"]}
  7. /summon block_display ~-6 ~0.4 ~ {Tags:["c9_all","c9_base"],block_state:{Name:"minecraft:dark_oak_planks"},transformation:{translation:[-1.0f,-0.2f,-0.4f],scale:[2.2f,0.35f,0.8f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_all"],block_state:{Name:"minecraft:grindstone",Properties:{face:"floor",facing:"east"}},transformation:{translation:[-0.5f,-0.4f,-0.7f],scale:[1.2f,1.2f,0.5f]}},{id:"minecraft:block_display",Tags:["c9_all"],block_state:{Name:"minecraft:grindstone",Properties:{face:"floor",facing:"east"}},transformation:{translation:[-0.5f,-0.4f,0.4f],scale:[1.2f,1.2f,0.5f]}},{id:"minecraft:block_display",Tags:["c9_all"],block_state:{Name:"minecraft:iron_block"},transformation:{translation:[0.2f,0.1f,-0.75f],scale:[0.2f,1.3f,1.5f]}}]}
  8. /summon block_display ~-6 ~1.1 ~ {Tags:["c9_all","c9_barrel"],interpolation_duration:4,block_state:{Name:"minecraft:netherite_block"},transformation:{left_rotation:[0.0f,0.0f,0.173f,0.985f],translation:[-0.8f,0.0f,-0.25f],scale:[2.8f,0.5f,0.5f]}}
  9. /summon armor_stand ~-5.2 ~1.1 ~ {Tags:["c9_all","c9_crew"],Invisible:0b,NoBasePlate:1b,ShowArms:1b,Rotation:[-90f,0f],equipment:{head:{id:"minecraft:turtle_helmet"},chest:{id:"minecraft:leather_chestplate",components:{"minecraft:dyed_color":5592405}},legs:{id:"minecraft:leather_leggings",components:{"minecraft:dyed_color":5592405}},feet:{id:"minecraft:leather_boots",components:{"minecraft:dyed_color":2236962}},mainhand:{id:"minecraft:spyglass"}}}
  10. /summon armor_stand ~5 ~0.2 ~ {Tags:["c9_all","c9_target"],Invisible:0b,NoBasePlate:1b,ShowArms:1b,Rotation:[90f,0f],equipment:{head:{id:"minecraft:iron_helmet"},chest:{id:"minecraft:leather_chestplate",components:{"minecraft:dyed_color":3355443}},mainhand:{id:"minecraft:crossbow"}}}

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

  1. /execute as @e[tag=c9_ctrl] run scoreboard players add @s c9_t 1
  2. /execute as @e[tag=c9_ctrl,scores={c9_t=80..}] run scoreboard players set @s c9_t 0
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 10 as @e[tag=c9_barrel] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{left_rotation:[0.0f,0.0f,0.22f,0.975f],translation:[-1.5f,-0.15f,-0.25f],scale:[2.8f,0.5f,0.5f]}}
  4. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 10 run particle campfire_cosy_smoke ~-3.8 ~1.8 ~ 0.3 0.3 0.3 0.05 25 force
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 10 run particle flame ~-3.8 ~1.8 ~ 0.2 0.2 0.2 0.1 30 force
  6. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 10 run playsound entity.generic.explode master @a ~-4 ~1.8 ~ 1.2 0.7
  7. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 10 run summon item_display ~-3.8 ~1.8 ~ {Tags:["c9_all","c9_shell"],Glowing:1b,item:{id:"minecraft:fire_charge"},transformation:{scale:[0.8f,0.8f,0.8f]}}
  8. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 15 as @e[tag=c9_barrel] run data merge entity @s {start_interpolation:0,interpolation_duration:15,transformation:{left_rotation:[0.0f,0.0f,0.173f,0.985f],translation:[-0.8f,0.0f,-0.25f],scale:[2.8f,0.5f,0.5f]}}
  9. /execute as @e[tag=c9_shell] at @s run scoreboard players add @s c9_t 1
  10. /execute as @e[tag=c9_shell,scores={c9_t=1..10}] at @s run tp @s ~0.44 ~0.25 ~
  11. /execute as @e[tag=c9_shell,scores={c9_t=11..20}] at @s run tp @s ~0.44 ~-0.37 ~
  12. /execute as @e[tag=c9_shell] at @s run particle large_smoke ~ ~ ~ 0.05 0.05 0.05 0.01 3 force
  13. /execute as @e[tag=c9_shell,scores={c9_t=20}] at @s run particle explosion_emitter ~ ~ ~ 0 0 0 1 1 force
  14. /execute as @e[tag=c9_shell,scores={c9_t=20}] at @s run kill @s

How it works

Frames from the test run

Trench Warfare Artillery Display - frame 1Trench Warfare Artillery Display - frame 2Trench Warfare Artillery Display - frame 3

Recorded on our own test server: 49 frames at about 9.8 fps. Our image check saw: A small dirt battlefield diorama features a custom block-display cannon firing a smoky parabolic projectile toward a trench fortified with sandstone and cobwebs.

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 in the center of a flat open area with at least 10 blocks of space in every direction.
  2. Run the 10 setup commands in order in chat or paste them into impulse command blocks to build the terrain, trench line, crew, and artillery display.
  3. Place a line of 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks, all set to Always Active).
  4. Paste each loop command into the command blocks in order.
  5. Watch the artillery cannon automatically recoil and fire explosive shells across no-man's-land every 4 seconds.

Use it with real players

To fire the artillery manually instead of on an automatic loop, remove the first two loop commands and set /scoreboard players set @e[tag=c9_ctrl] c9_t 10 whenever a player presses a button or right-clicks an item near the cannon crew.

Remove it again 4 commands

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

FAQ

Does the artillery explosion destroy real blocks?

No, the bombardment uses particle effects and display entities rather than real TNT, so your world builds and terrain remain completely safe.

How can I change the firing speed of the cannon?

In the second loop command, change the score check from 80.. to a lower number like 40.. to make the cannon fire twice as fast.

Commands used

/data/execute/fill/kill/particle/playsound/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides