If you use an item modifier in a command to remove the food component of an item while eating it, like so:
item modify entity @s weapon.mainhand {"function":"minecraft:set_components","components":{"!minecraft:food":{}}}
The player continues to eat the item despite it no longer having the necessary component. Manually cancelling the animation proves that the removal was successful, as the item can no longer be eaten.
Attachments
Comments 3
@tryashtar I have attached a video showing the effect.
I cannot reproduce this