Automated Siege Trebuchet

Build a working siege trebuchet using block displays that winds up its counterweight, launches a flaming boulder, and shatters a castle wall.

Java EditionHolograms & Display EntitiesHard24 commandsTested on a real 26.2 & 26.3 server
A wooden trebuchet launches a fiery projectile that bursts through a stone brick wall in smoke. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsMedievalFireOrangeRedBlackCinematicAdventure MapDecorationBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Glowing outlines21+ commands

This command creation builds an animated siege trebuchet opposite a fortified stone wall. Using smooth display entity interpolation, the trebuchet winds its throwing arm down while raising a heavy iron counterweight, then whips forward to launch a glowing magma boulder across the battlefield.

The projectile flies in a high arc, leaving a trail of fire and thick smoke before smashing through the stone bricks in a burst of sparks and debris. After a short cooldown, the wall rebuilds itself and the siege engine reloads for another shot.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_treb dummy
  2. /scoreboard players set #time c9_treb 0
  3. /fill ~-4 ~ ~-11 ~4 ~2 ~-7 cobblestone
  4. /fill ~-2 ~1 ~-11 ~2 ~5 ~-9 stripped_spruce_wood
  5. /fill ~-1 ~1 ~-11 ~1 ~5 ~-9 air
  6. /fill ~-5 ~ ~10 ~5 ~6 ~12 stone_bricks
  7. /fill ~-5 ~7 ~10 ~5 ~7 ~12 stone_brick_slab
  8. /summon block_display ~ ~5 ~-10 {Tags:["c9_t","c9_arm"],block_state:{Name:"dark_oak_wood"},transformation:{translation:[-0.25f,-1.5f,-0.25f],scale:[0.5f,7.5f,0.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  9. /summon block_display ~ ~5 ~-10 {Tags:["c9_t","c9_weight"],block_state:{Name:"iron_block"},transformation:{translation:[-0.6f,-2.7f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /summon block_display ~ ~2 ~-13 {Tags:["c9_t","c9_proj"],Glowing:1b,glow_color_override:16733440,block_state:{Name:"magma_block"},transformation:{translation:[-0.45f,-0.45f,-0.45f],scale:[0.9f,0.9f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}

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

  1. /scoreboard players add #time c9_treb 1
  2. /execute if score #time c9_treb matches 141.. run scoreboard players set #time c9_treb 1
  3. /execute if score #time c9_treb matches 1 run fill ~-4 ~1 ~10 ~4 ~6 ~12 stone_bricks
  4. /execute if score #time c9_treb matches 1 run data merge entity @e[tag=c9_arm,limit=1] {start_interpolation:0,interpolation_duration:45,transformation:{translation:[-0.25f,-1.5f,-0.25f],scale:[0.5f,7.5f,0.5f],left_rotation:[-0.766f,0f,0f,0.643f],right_rotation:[0f,0f,0f,1f]}}
  5. /execute if score #time c9_treb matches 1 run data merge entity @e[tag=c9_weight,limit=1] {start_interpolation:0,interpolation_duration:45,transformation:{translation:[-0.6f,-2.7f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[-0.766f,0f,0f,0.643f],right_rotation:[0f,0f,0f,1f]}}
  6. /execute if score #time c9_treb matches 1 run tp @e[tag=c9_proj] ~ ~1.2 ~-14.6
  7. /execute if score #time c9_treb matches 1..45 as @e[tag=c9_proj] at @s run particle crit ~ ~0.5 ~ 0.3 0.2 0.3 0.05 2 force
  8. /execute if score #time c9_treb matches 50 run data merge entity @e[tag=c9_arm,limit=1] {start_interpolation:0,interpolation_duration:7,transformation:{translation:[-0.25f,-1.5f,-0.25f],scale:[0.5f,7.5f,0.5f],left_rotation:[0.259f,0f,0f,0.966f],right_rotation:[0f,0f,0f,1f]}}
  9. /execute if score #time c9_treb matches 50 run data merge entity @e[tag=c9_weight,limit=1] {start_interpolation:0,interpolation_duration:7,transformation:{translation:[-0.6f,-2.7f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0.259f,0f,0f,0.966f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute if score #time c9_treb matches 51..58 as @e[tag=c9_proj] at @s run tp @s ~ ~1.35 ~0.95
  11. /execute if score #time c9_treb matches 59..68 as @e[tag=c9_proj] at @s run tp @s ~ ~0.4 ~1.2
  12. /execute if score #time c9_treb matches 69..78 as @e[tag=c9_proj] at @s run tp @s ~ ~-1.2 ~1.2
  13. /execute if score #time c9_treb matches 51..78 as @e[tag=c9_proj] at @s run particle flame ~ ~ ~ 0.2 0.2 0.2 0.03 8 force
  14. /execute if score #time c9_treb matches 78 run fill ~-2 ~1 ~10 ~2 ~5 ~12 air destroy

How it works

Frames from the test run

Automated Siege Trebuchet - frame 1Automated Siege Trebuchet - frame 2Automated Siege Trebuchet - frame 3

Recorded on our own test server: 57 frames at about 9.5 fps. Our image check saw: A wooden trebuchet behind a stone brick wall launches a flaming projectile that leaves smoke and breaks a hole in the center of the wall.

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 41x41 grass area looking South (+Z) and run each of the 10 setup commands in chat.
  2. Verify that the wooden trebuchet frame appears behind you (-Z) and the stone brick target wall appears in front of you (+Z).
  3. Place a line of 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks) underneath the center of the stage.
  4. Paste the 14 loop commands into the command blocks in order, wrapping each with execute positioned X Y Z run ... using your center coordinates.
  5. Set all command blocks to Always Active to start the automated firing cycle.
  6. Watch the trebuchet wind back, fire the magma boulder, and blow a hole through the stone wall every 7 seconds.

Use it with real players

To let players fire the trebuchet manually instead of looping automatically, remove the first two loop commands and add a button connected to a command block that runs /scoreboard players set #time c9_treb 50 while a separate repeating block increments #time only when it is between 1 and 80.

Remove it again 4 commands

  1. /kill @e[tag=c9_t]
  2. /kill @e[type=item]
  3. /scoreboard objectives remove c9_treb
  4. /fill ~-6 ~ ~-15 ~6 ~8 ~14 air

FAQ

Why does the trebuchet arm rotate around a point inside the wooden frame instead of its corner?

In the transformation compound, the translation vector [-0.25, -1.5, -0.25] offsets the model geometry relative to the entity's coordinates, and left_rotation applies before translation, rotating the entire offset beam around the entity's exact spawn position.

Will the dropped stone brick items cause lag over time?

The wall only breaks once every 7 seconds and drops a small handful of blocks, which despawn naturally or can be cleared by adding a command that kills items on tick 1.

Commands used

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

Similar creations

Join 9Minecraft News & Guides