mojira.dev
MC-271736

Eating animation is not cancelled when the food component is removed mid-animation

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

I cannot reproduce this

@tryashtar I have attached a video showing the effect.

https://streamable.com/29un6n

Your game is modified, thus this is invalid anyway.

InQuognito

(Unassigned)

Unconfirmed

(Unassigned)

1.20.6

Retrieved