Another way to reproduce: Dig 30 blocks down and replace the bottom block with water. Then, use this command:
/give @p minecraft:trident{Enchantments:[{id:riptide,lvl:32767}]} 1
Next, aim your trident up into the sky, then release.
Do nothing else.
Here is a demonstration: https://youtu.be/SNnJ_4DuaiU
Another way to reproduce: Dig 30 blocks down and replace the bottom block with water. Then, use this command:
Next, aim your trident up into the sky, then release.
Do nothing else.
Here is a demonstration: https://youtu.be/SNnJ_4DuaiU