Swimming
Wire swim clips and the water dive into a Punchy! Moves pack, add sneak tucks (a cannonball and a belly flop), tune the blends and test it all in game.
-
Blockbench
-
Punchy! Studio
This page has not been translated into Polish yet, so it is shown in English. Read in English
On this page
This recipe takes you from a few swim and dive clips to a player that swims at the surface, under the water and straight up or down, and dives into a pool from a height. You wire the clips in a compat file, then add sneak tucks, so that sneaking in the air turns the dive into a cannonball or a belly flop. It is for anyone who already has clips (see How to create custom animations) and wants them to play in water.
The clips and settings come from the example pack provided by Crafto, Fluid & Foolish, the Punchy! Moves animation pack used for every Moves demo on this wiki.
Before you start
- Punchy! Moves installed. See Getting started.
- A resource pack with an
assets/punchy_moves/animations/folder and acompat/folder beside it. How to create custom animations shows how to make the pack, and Punchy! Studio’s New Pack makes one for you. - The swim and dive clips. The examples use the clip names of the example pack provided by Crafto, so they work as they stand only with that pack on. With your own clips, put your names in.
The clips you need
A swim needs one clip to start with. Three give you a surface swim, an underwater swim and a vertical swim. A dive is an air clip, and everything else about it is optional. These are the clips of the example pack provided by Crafto, with how each one plays. To build the same set yourself, name your clips as in the first column and save them in .animation.json files in assets/punchy_moves/animations/:
| Clip | Used as | How it plays | Length |
|---|---|---|---|
swimming_ | swimming. | Loops | 1 second |
swimming_ | swimming. | Loops | 1.3 seconds |
swimming_ | swimming. | Loops | 1.3 seconds |
dive | water_ | Plays once, then holds its last frame | 0.6 seconds |
dive_loop | water_ | Loops, and sways over the dive clip while you fall | 1 second |
cannonball | water_ | Plays once, then holds its last frame | 0.75 seconds |
cannonball_ | water_ | Loops, and sways over the cannonball clip once you sneak | 1 second |
belly_flop | water_ | Plays once, then holds its last frame | 0.75 seconds |
belly_loop | water_ | Loops, and sways over the belly_flop clip once you sneak | 1 second |
Make them the way Walk cycle makes a loop. In Blockbench, set Loop Mode to Loop for the clips that loop. For an air clip, leave it as Play Once (Hold On Last Frame plays the same in the mod): Punchy! Moves plays it once and keeps its last pose while you fall on. In Punchy! Studio, tick Loop for the clips that loop and leave it unticked for an air clip.
How the game picks a swim clip
You swim when you are in water deep enough to swim in and the pack has at least one swim clip. Each moment, one clip plays:
verticalwhile you hold the jump key or the sneak key, but not both, so you rise or sink.underwaterwhile your head is under the water.surfaceotherwise, with your head above the water.
A clip that is missing is replaced by another, so a pack with only surface still swims everywhere. The swim clip plays faster the faster you swim, plays backward when you swim backward, and slows to a stop when you stop. Wading through shallow water with your head above it is not swimming: that has its own walk_on_water pose, in the compat files reference.
Wire the swim and a plain dive
This compat file plays the three swim clips and a dive. The dive is the dive clip in the air, with the dive_loop clip as a small sway over it, then the dive_loop clip in the water.
{
"format_version": 2,
"defaults": {
"animations": {
"swimming": {
"surface": "swimming_overwater",
"underwater": "swimming_underwater",
"vertical": "swimming_vertical"
},
"water_dive": {
"air": "dive",
"loop": "dive_loop"
}
}
}
}
In Blockbench
Blockbench exports the clips, and you write the compat file as a text file in the pack.
- In your pack, open
assets/punchy_moves/compat/. Make the folder if it is not there. It sits next to theanimationsfolder. - Make a text file in it called
my_swimming.json(any name that ends in.jsonworks) and paste the JSON above. - In the game, open Options, then Resource Packs, move your pack to the right-hand list and press Done. If the pack was already on, press F3+T to reload.
In Punchy! Studio
Studio edits compat files in its Bindings workspace and tells you, while you type, whether the game would read the file.
- Join a world and press F6 to open Punchy! Studio. Pick Third Person with the switch between the menus and the workspace tabs, then open the Bindings tab (Ctrl+B). The outliner, titled Compat Files, lists each file and every object in it.
- Select the pack’s compat file. To add another file, press New Compat File, type a File name and press Create.
- Choose File > Raw JSON, or press the Raw JSON button above the sheet. Replace the text with the JSON above.
- Watch the line under the text. It says Punchy reads this. when the game would read the file. Press Apply. The Verdict panel of the sheet then says The game reads it.
- Press Ctrl+E. In Export Punchy Moves Pack, keep Turn the pack on and reload ticked and press Export, then close the editor with F6.
Now try it in game.
- Press F5 to look at your player in third person.
- Swim forward at the surface of deep water. The
surfaceclip plays. - Swim down and forward. When your head goes under, the
underwaterclip takes over. - Hold Space to rise, then the sneak key (Shift by default) to sink. The
verticalclip plays for both. - Build a platform 10 blocks above a pool of deep water, with nothing but air between the two. Step off, or jump off. The
diveclip plays in the air, with thedive_loopclip swaying over it. In the water the dive’s loop plays for one cycle, or less if you start to swim, and then the swim takes over.
Video coming soon
What happens in a dive
Knowing the order of events makes every key below easier to place.
- The start. A dive starts when you are in the air and water lies straight below you, with only air between. The drop has to be at least
trigger_distanceblocks, counting what you have already fallen and what is left to the water. It is 3 by default. Theairclip then plays once and holds its last frame while you fall on, and the dive’sloopclip plays over it as a small sway. - The entry. When you reach the water, a plain dive plays its
contactclip if the pack has one, then goes on toloop. A dive with no contact clip keeps its last pose in the water and goes on toloop. Theloopclip plays one cycle, or ends sooner when you start to move, rise or sink. The example pack provided by Crafto has no contact clip. The step from the air into the water blends overentry_blend_seconds. - The hand-over. Once the dive’s clips are done, the swim clip takes over, blended over
swim_blend_seconds. A dive with neither a contact clip nor a loop hands over to swimming at once. For the hand-over to happen, the pack needs at least one swim clip.
Add sneak tucks
A tuck changes the dive while you are in the air. Sneak early and you curl into a cannonball. Sneak later and you flop flat for a belly flop. Four keys name the clips, and one sets how early counts as early:
sneak_airis the cannonball’s air clip, andsneak_loopits loop.late_sneak_airis the belly flop’s air clip, andlate_sneak_loopits loop.sneak_window_secondsis how long after the dive starts a sneak still picks the cannonball. It is 0.3 seconds by default.
Here is the whole file with the tucks of the example pack provided by Crafto. Every number in this file is the default, written out so you can see it: change one only when you want a different feel.
{
"format_version": 2,
"defaults": {
"animations": {
"swimming": {
"surface": "swimming_overwater",
"underwater": "swimming_underwater",
"vertical": "swimming_vertical",
"surface_body_depth": 0.12,
"surface_grace_distance": 1.35,
"vertical_tilt_degrees": 30.8,
"sprint_playback_multiplier": 1.25
},
"water_dive": {
"air": "dive",
"loop": "dive_loop",
"trigger_distance": 3,
"entry_blend_seconds": 0.45,
"swim_blend_seconds": 0.6,
"sneak_air": "cannonball",
"sneak_loop": "cannonball_loop",
"late_sneak_air": "belly_flop",
"late_sneak_loop": "belly_loop",
"sneak_window_seconds": 0.3
}
}
}
}
Put it in the same compat file as before, in place of the old text. In Blockbench’s route, reload with F3+T. In Studio, press Apply, then export again with Ctrl+E. Then test all three dives from the same platform.
- Step off the platform and hold the sneak key (Shift by default) at once. The dive turns into the cannonball. The
cannonballclip starts when you sneak. - Climb up and step off again. Wait about half a second in the air, then hold the sneak key. The dive turns into the belly flop.
- Climb up and step off once more, without sneaking. The plain
diveplays.
Video coming soon
A few rules decide how tucks behave:
- The first sneak decides. A dive takes one tuck at most. Letting go of the sneak key does not undo it.
- The tuck’s air clip starts when you sneak. The dive’s own clip blends into it, and the tuck’s loop, if it has one, sways over it from then on.
- A tuck plays no contact clip. In the water it keeps the tuck’s last pose and goes on with the tuck’s loop. If the tuck has no loop, you go straight into the swim.
- A missing tuck leaves the plain dive. If the tuck you picked has no air clip, the dive stays the plain dive.
- Every dive starts as the plain dive. With
sneak_airorlate_sneak_airin the pack, a dive begins withair, and a pack withoutairplays no dive at all. In a pack with tucks,alternate_air,alternate_loopandalternate_chanceare not used.
Keys of swimming
| Key | Type | Default | What it does | Example |
|---|---|---|---|---|
surface | clip | Swimming at the surface. | "swimming_ | |
underwater | clip | Swimming with your head under the water. | "swimming_ | |
vertical | clip | Swimming up or down, while you hold the jump key or the sneak key. | "swimming_ | |
surface_ | number | 0.12 | How deep the body sits under the surface in the surface pose. | 0.12 |
surface_ | number | 1.35 | How far above the surface the surface pose holds before it lets go. At least 0.25. | 1.35 |
vertical_ | number | 30.8 | The largest body tilt in the vertical pose, in degrees. | 30.8 |
sprint_ | number | 1.25 | How much faster the horizontal swim clips play while you sprint-swim. A value below 1 counts as 1. | 1.25 |
timer_ | number | 1 | A speed factor for the swim clips. Not below 0. | 0.8 |
Keys of water_dive
| Key | Type | Default | What it does | Example |
|---|---|---|---|---|
air | clip | The dive's air clip. It plays once while you fall toward the water and holds its last frame. | "dive" | |
contact | clip | Plays as a plain dive hits the water, before the loop. A tuck never plays it. | "my_ | |
loop | clip | The plain dive's loop clip. It sways over the air clip while you fall, and plays in the water after the entry. | "dive_ | |
sneak_air | clip | The cannonball's air clip, picked when you sneak within sneak_ of the dive's start. | "cannonball" | |
sneak_loop | clip | The cannonball's loop. | "cannonball_ | |
late_ | clip | The belly flop's air clip, picked when you sneak after the window. | "belly_ | |
late_ | clip | The belly flop's loop. | "belly_ | |
sneak_ | number | 0.3 | How long after the dive starts in the air a sneak still picks the cannonball. A negative value counts as 0. It counts only with the tuck clips. | 0.3 |
trigger_ | number | 3 | Blocks of drop that start a dive: what you have already fallen plus what is left to the water. At least 0.5. | 3 |
entry_ | number | 0.45 | How long the dive takes to blend into the water: from the air clip into the contact clip or the held entry pose, and from the contact into its loop. Above 0, kept between 0.05 and 5. 0 or less, or a value that is not a number, means 0.45. | 0.45 |
swim_ | number | 0.6 | How long the hand-over from the dive to swimming takes, once the dive's clips are done and you swim. Above 0, kept between 0.05 and 5. 0 or less means 0.6. | 0.6 |
alternate_ | clip | A second air clip, picked by chance at the start of a dive. Used only by packs without sneak_air and late_. alternate_ is its loop and alternate_ the chance, from 0 to 1 (0.5 by default). | "my_ |
The full list of keys, with the lava dive and walk_on_water, is in the compat files reference.
Things that stop a swim or a dive
- The dive never starts. Check that nothing but air lies between you and the water, down to 48 blocks. A block of any other kind in the way ends the check. Check that the drop is at least
trigger_distance, that the pack has anairclip (in a pack without tucks,alternate_airalso starts a dive), and that you are not climbing, crawling or flying with elytra or in creative flight. - No dive after a jump out of the water. A dive needs you to have stood on the ground since you were last in water or lava. Jump out of a pool and drop back in, and you swim straight away.
- A tuck does nothing. The tuck you picked has no air clip. Early sneaks need
sneak_air, and late sneaks needlate_sneak_air. Give both, or the dive stays plain on the side you left out. - The dive plays and then nothing swims. The hand-over needs a swim clip. Add
surface,underwaterorvertical. - The whole file is ignored. One key the format does not accept makes the game skip the entire file. See Things that drop a whole file, and Why a clip does not play when the file loads but a clip stays silent.
Related pages
- Compat files, the reference for every key.
- Camera and features, where swimming and diving sit among the other moments the camera and body react to.
- Walk cycle, for making a looping clip and wiring it.
- How to create custom animations, for making the clips themselves.
Last checked against the mod on 30 October 2026.