Riptide tridents cannot be eaten outside of water and rain when they have the MINECRAFT:FOOD component. As item usage is not possible, you should eat it instead. This is related to MC-269631 and MC-145916.
Steps to replicate
/give @s minecraft:trident[minecraft:food={nutrition:4,saturation_modifier:0.1},minecraft:enchantments={"minecraft:riptide":3}]
Try to eat the trident outside water or rain
Observed behavior: Not possible.
Expected behavior: Should be possible.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki