I'm making a custom underwater map in Minecraft and I'm trying to figure out if there's any way to make a function to where instead of swimming upwards underwater you just have a 2 block jump? I don't want people wandering outside of the map from being able to swim around. Thanks!
Minecraft 1.13 uses tags to identify characteristics of different blocks and entities. Amongst those are fluid tags for lava and water. If you reset the fluid tag for water in your datapack, then the game will treat water like air and you will be unable to swim.
Note that boats are no longer able to float and particles will disappear if you do this. Items also won't float and sponges are unable to remove water.
After that, it's just a matter of giving players who are inside a water block a jumpboost effect.