Rolling Ocean Waves Shoreline

Build an automated sandy beach where rows of ocean water and frothy white foam rhythmically crash onto the shore and recede back into the sea.

Java EditionComplex Contraptions & CinematicsMedium24 commandsTested on a real 26.2 & 26.3 server
Foamy ocean waves with splashing water particles crash onto a sloped sandy beach in Minecraft. Download the GIF Video & GIF © www.9minecraft.net

SimulationsOceanWaterNatureBlueWhiteYellowDecorationMap MakingCinematicBlock displaysBlock building (fill/setblock/clone)Sounds21+ commands

Bring your Minecraft beaches to life with dynamic rolling ocean waves. Instead of flat, static water, this creation builds a sloped sandy shoreline where staggered rows of water and bright white sea foam surge up the beach, crash with splashing droplets, and smoothly pull back into the ocean.

The effect uses invisible marker entities driven by a scoreboard timer to simulate the natural ebb and flow of the tide, complete with block display waves, wet sand trails, and ambient seagull and wave sounds.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_wave dummy
  2. /fill ~-12 ~-1 ~-10 ~12 ~-1 ~2 prismarine_bricks
  3. /fill ~-12 ~ ~-10 ~12 ~ ~-2 water
  4. /fill ~-12 ~ ~-1 ~12 ~ ~3 sand
  5. /fill ~-12 ~1 ~4 ~12 ~1 ~8 sand
  6. /fill ~-12 ~2 ~9 ~12 ~2 ~12 sandstone
  7. /fill ~-12 ~1 ~3 ~12 ~1 ~3 sandstone_slab[type=bottom]
  8. /fill ~-12 ~2 ~8 ~12 ~2 ~8 sandstone_slab[type=bottom]
  9. /summon block_display ~-12 ~0.1 ~-2 {Tags:["c9_ent","c9_crest","c9_w1"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[25f,0.45f,1.2f],translation:[0f,0f,0f]}}
  10. /summon block_display ~-12 ~0.1 ~-5 {Tags:["c9_ent","c9_crest","c9_w2"],block_state:{Name:"minecraft:light_blue_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[25f,0.35f,1.0f],translation:[0f,0f,0f]}}

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

  1. /scoreboard players add #c9_t c9_wave 1
  2. /execute if score #c9_t c9_wave matches 100.. run scoreboard players set #c9_t c9_wave 0
  3. /execute if score #c9_t c9_wave matches 1..45 as @e[tag=c9_w1] at @s run tp @s ~ ~0.025 ~0.13
  4. /execute if score #c9_t c9_wave matches 46..55 as @e[tag=c9_w1] at @s run tp @s ~ ~ ~0.03
  5. /execute if score #c9_t c9_wave matches 56..99 as @e[tag=c9_w1] at @s run tp @s ~ ~-0.025 ~-0.13
  6. /execute if score #c9_t c9_wave matches 0 as @e[tag=c9_w1] run tp @s ~-12 ~0.1 ~-2
  7. /execute if score #c9_t c9_wave matches 1..45 as @e[tag=c9_w2] at @s run tp @s ~ ~0.02 ~0.12
  8. /execute if score #c9_t c9_wave matches 56..99 as @e[tag=c9_w2] at @s run tp @s ~ ~-0.02 ~-0.12
  9. /execute if score #c9_t c9_wave matches 0 as @e[tag=c9_w2] run tp @s ~-12 ~0.1 ~-5
  10. /execute at @e[tag=c9_crest] run particle dust{color:[0.95,0.98,1.0],scale:1.6} ~12.5 ~0.4 ~1.0 6.5 0.1 0.2 0 25 force
  11. /execute at @e[tag=c9_crest] run particle dust{color:[0.1,0.65,0.95],scale:1.5} ~12.5 ~0.2 ~0.4 6.5 0.15 0.3 0 20 force
  12. /execute at @e[tag=c9_w1] run particle splash ~12.5 ~0.5 ~1.1 6.5 0.1 0.2 0.1 18 force
  13. /execute if score #c9_t c9_wave matches 45 at @e[tag=c9_w1] run particle cloud ~12.5 ~0.5 ~1.2 6.5 0.15 0.3 0.03 35 force
  14. /execute if score #c9_t c9_wave matches 5 at @e[tag=c9_w1] run playsound entity.boat.paddle_water ambient @a ~12.5 ~ ~ 3.0 0.6

How it works

Frames from the test run

Rolling Ocean Waves Shoreline - frame 1Rolling Ocean Waves Shoreline - frame 2Rolling Ocean Waves Shoreline - frame 3

Recorded on our own test server: 55 frames at about 9.2 fps. Our image check saw: A tiered sandy beach has water and blue-and-white splash particles surging up the shoreline in waves and then receding back toward the pool.

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. Find or clear a flat 30x30 area where you want your shoreline.
  2. Run each of the 10 setup commands in chat while standing at the center of the area to build the ocean floor, water, sloped sand beach, and the two wave display entities.
  3. Place 14 repeating command blocks in a line or column nearby, set them all to Always Active, and paste one loop command into each block.
  4. If you place the command blocks away from the center of the beach, wrap the position-sensitive loop commands (indices 5 and 8) with your beach center coordinates so the waves reset to the right spot.
  5. Watch the waves surge up the sandy slope, break into white sea foam at the peak, and pull back into the sea every 5 seconds.

Use it with real players

To make the waves push players and boats up the beach as they surge, add one extra repeating command block with: /execute if score #c9_t c9_wave matches 1..45 at @e[tag=c9_w1] as @a[dx=24,dy=2,dz=2] at @s run tp @s ~ ~0.05 ~0.13.

Remove it again 4 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_wave
  3. /fill ~-12 ~ ~-10 ~12 ~3 ~12 air
  4. /fill ~-12 ~-1 ~-10 ~12 ~-1 ~12 grass_block

FAQ

Can I make the waves wider for a larger coastline?

Yes! Increase the first number in the scale array of the two block_display summon commands (currently 25f) and increase the X spread value (currently 6.5) and X offset (currently ~12.5) in the particle commands.

Does this creation cause lag over time?

No. It only uses two persistent block_display entities that move back and forth on a 100-tick loop, so entity counts never grow.

Commands used

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

Similar creations

Join 9Minecraft News & Guides