mojira.dev
MC-276543

In snapshot 24w36a, the item stack component "minecraft:food" does not work.

In snapshot 24w36a, the item stack component "minecraft:food" does not work.

I tried to put this command into the command block and then activate the command block. As a result, I realized that it is not edible

"give @p minecraft:diamond[minecraft:food={nutrition:2,saturation:2f,can_always_eat:true}]"

Even if I switch game modes or change commands, I still can't eat it.

Comments 3

Is this accounting for the component changes mentioned in the 24w36a blog post?

Your command does not include formatting changes made in 24w36a. You are missing the consumable= data.

Here is a working command:

/give @p dirt[minecraft:consumable={},food={nutrition:1,saturation:1,can_always_eat:1b}]

Thank you, but I think it is more difficult.

Tan_Jansheng

(Unassigned)

Unconfirmed

(Unassigned)

command, component, food_component

24w36a

Retrieved