Use this command:
/give @s minecraft:diamond[minecraft:food={nutrition:1,saturation_modifier:0,eat_seconds:0.049,can_always_eat:true}] 64/give @s minecraft:diamond[minecraft:food={nutrition:1,saturation_modifier:0,eat_seconds:0.049,can_always_eat:true}] 64when food.eat_seconds <0.05,the food won't be eaten
when food.eat_seconds ≥0.05,it will be eaten
Comments 2
The command doesn't work without editing it, here's a fixed version:
/give @s minecraft:diamond[minecraft:food={nutrition:1,saturation_modifier:0,eat_seconds:0.049,can_always_eat:true}] 64/give @s minecraft:diamond[minecraft:food={nutrition:1,saturation_modifier:0,eat_seconds:0.049,can_always_eat:true}] 64
Can confirm.