Dynamic Swinging Rope Physics with Command Blocks

Build a realistic swinging rope in Minecraft using 7 linked display segments, inverse kinematics, and a glowing sea lantern weight with command blocks.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
A glowing segmented pendulum with a sea lantern weight swings from a dark stone frame at night. Download the GIF Video & GIF © www.9minecraft.net

SimulationsTechnologyMedievalGoldCyanWhiteLearningMap MakingDecorationBlock displaysArmor standsSmooth animation (interpolation)Riding & passengersSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

Traditional ropes built from fences or chains in Minecraft are completely rigid and static. This command creation constructs a suspended, glowing tether out of seven linked display segments and a heavy sea lantern weight that sways, bends, and ripples smoothly through the air.

By coupling a physics-driven pendulum bob with a chain of directional teleports, each segment dynamically rotates and follows its neighbor. Periodic wind gusts push the lantern back and forth across a stone frame while emitting glowing flame and end rod trails.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /fill ~-5 ~ ~ ~-5 ~11 ~ minecraft:deepslate_brick_wall
  3. /fill ~5 ~ ~ ~5 ~11 ~ minecraft:deepslate_brick_wall
  4. /fill ~-6 ~12 ~ ~6 ~12 ~ minecraft:polished_deepslate_slab[type=bottom]
  5. /summon minecraft:block_display ~ ~11.4 ~ {Tags:["c9_all","c9_anchor"],Glowing:1b,glow_color_override:16755200,brightness:{sky:15,block:15},block_state:{Name:"minecraft:lodestone"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.5f,-0.5f,-0.5f],scale:[1.0f,1.0f,1.0f]}}
  6. /summon minecraft:armor_stand ~4.5 ~7.5 ~1.5 {Tags:["c9_all","c9_bob"],Invisible:1b,Small:1b,NoBasePlate:1b,Motion:[-0.55d,0.25d,-0.25d]}
  7. /summon minecraft:block_display ~ ~10.5 ~ {Tags:["c9_all","c9_seg","c9_s1"],teleport_duration:2,Glowing:1b,glow_color_override:16755200,brightness:{sky:15,block:15},block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.25f,-0.25f,-0.55f],scale:[0.5f,0.5f,1.1f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_all","c9_seg","c9_s2"],teleport_duration:2,Glowing:1b,glow_color_override:16766720,brightness:{sky:15,block:15},block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,-0.22f,-0.55f],scale:[0.44f,0.44f,1.1f]}},{id:"minecraft:block_display",Tags:["c9_all","c9_seg","c9_s3"],teleport_duration:2,Glowing:1b,glow_color_override:16755200,brightness:{sky:15,block:15},block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.25f,-0.25f,-0.55f],scale:[0.5f,0.5f,1.1f]}}]}
  8. /summon minecraft:block_display ~ ~7.5 ~ {Tags:["c9_all","c9_seg","c9_s4"],teleport_duration:2,Glowing:1b,glow_color_override:16766720,brightness:{sky:15,block:15},block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,-0.22f,-0.55f],scale:[0.44f,0.44f,1.1f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_all","c9_seg","c9_s5"],teleport_duration:2,Glowing:1b,glow_color_override:16755200,brightness:{sky:15,block:15},block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.25f,-0.25f,-0.55f],scale:[0.5f,0.5f,1.1f]}},{id:"minecraft:block_display",Tags:["c9_all","c9_seg","c9_s6"],teleport_duration:2,Glowing:1b,glow_color_override:16766720,brightness:{sky:15,block:15},block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,-0.22f,-0.55f],scale:[0.44f,0.44f,1.1f]}}]}
  9. /summon minecraft:block_display ~ ~5.5 ~ {Tags:["c9_all","c9_seg","c9_s7"],teleport_duration:2,Glowing:1b,glow_color_override:5636095,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.6f,-0.6f,-0.6f],scale:[1.2f,1.2f,1.2f]}}
  10. /execute as @e[tag=c9_seg] run ride @s dismount

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

  1. /scoreboard players add #c9_clock c9_tick 1
  2. /execute if score #c9_clock c9_tick matches 45 run data merge entity @e[tag=c9_bob,limit=1] {Motion:[-0.65d,0.35d,-0.25d]}
  3. /execute if score #c9_clock c9_tick matches 45 at @e[tag=c9_s7] run particle minecraft:gust_emitter_small ~ ~ ~ 0 0 0 0 1
  4. /execute if score #c9_clock c9_tick matches 90.. run scoreboard players set #c9_clock c9_tick 0
  5. /execute if score #c9_clock c9_tick matches 1 run data merge entity @e[tag=c9_bob,limit=1] {Motion:[0.65d,0.35d,0.25d]}
  6. /execute if score #c9_clock c9_tick matches 1 at @e[tag=c9_s7] run particle minecraft:gust_emitter_small ~ ~ ~ 0 0 0 0 1
  7. /execute as @e[tag=c9_bob] at @e[tag=c9_anchor] facing entity @s feet run tp @s ^ ^ ^5.6
  8. /execute as @e[tag=c9_s1] at @e[tag=c9_anchor] facing entity @e[tag=c9_s2,limit=1] feet run tp @s ^ ^ ^0.75 ~ ~
  9. /execute as @e[tag=c9_s2] at @e[tag=c9_s1] facing entity @e[tag=c9_s3,limit=1] feet run tp @s ^ ^ ^0.85 ~ ~
  10. /execute as @e[tag=c9_s3] at @e[tag=c9_s2] facing entity @e[tag=c9_s4,limit=1] feet run tp @s ^ ^ ^0.85 ~ ~
  11. /execute as @e[tag=c9_s4] at @e[tag=c9_s3] facing entity @e[tag=c9_s5,limit=1] feet run tp @s ^ ^ ^0.85 ~ ~
  12. /execute as @e[tag=c9_s5] at @e[tag=c9_s4] facing entity @e[tag=c9_s6,limit=1] feet run tp @s ^ ^ ^0.85 ~ ~
  13. /execute as @e[tag=c9_s6] at @e[tag=c9_s7] facing entity @e[tag=c9_s5,limit=1] feet run tp @s ^ ^ ^0.85 ~ ~
  14. /execute as @e[tag=c9_s7] at @e[tag=c9_bob] facing entity @e[tag=c9_s6,limit=1] feet run tp @s ~ ~ ~ ~ ~

How it works

Frames from the test run

Dynamic Swinging Rope Physics with Command Blocks - frame 1Dynamic Swinging Rope Physics with Command Blocks - frame 2Dynamic Swinging Rope Physics with Command Blocks - frame 3

Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A glowing segmented golden tether with a sea lantern weight at the end swings sideways from a stone frame at night.

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 on a flat open area with at least 15 blocks of vertical clearance.
  2. Run the 10 setup commands in order to build the deepslate support frame, the top lodestone anchor, the physics armor stand, and the 7 glowing rope segments.
  3. Make sure the final setup command runs so all passenger segments dismount from each other.
  4. Place 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks), all set to Always Active.
  5. Paste one loop command into each block in order to start the wind timer and the bidirectional rope kinematics.
  6. Watch the glowing gold and shroomlight tether flex and swing the sea lantern back and forth.

Use it with real players

To let a player push or pull the swinging rope directly instead of using the automatic wind timer, remove the first six loop commands and replace them with /execute at @a[distance=..3] as @e[tag=c9_bob,distance=..3] facing entity @p feet run data merge entity @s {Motion:[0.0d,0.3d,0.0d]} or attach the bottom segment c9_s7 directly to a player by changing the final loop command to execute at @p instead of at @e[tag=c9_bob].

Remove it again 3 commands

  1. /kill @e[tag=c9_all]
  2. /scoreboard objectives remove c9_tick
  3. /fill ~-6 ~ ~ ~6 ~12 ~ minecraft:air

FAQ

Why do the rope segments use teleport_duration instead of teleporting instantly?

Setting teleport_duration to 2 tells the Minecraft client to smoothly interpolate both the position and rotation of each block display over 2 ticks, eliminating jitter during fast swings.

Why were the segments stacked inside one block before dismounting?

Summoning multiple block displays using the Passengers tag lets us pack several segments into a single setup command, and running ride dismount separates them so they can move independently.

Commands used

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

Similar creations

Join 9Minecraft News & Guides