mojira.dev
MC-275771

component "consumable" doesn't work

as the title says

How to reproduce:

1.Use command

/give @s tnt[consumable={eat_seconds:0.05,using_converts_to:{id:stone,count:1},effects:[{effect:{duration:600,id:wither,amplifier:1,ambient:true,show_icon:true,show_particles:false},probability:1}]},food={can_always_eat:true,nutrition:10,saturation:20}]

2.edible

expected behavior:

Expected behavior: It takes 0.05 seconds to eat the item. After eating, you will get the stone and wither status effects of the item.

What actually happened:
nothing

 

Sorry, I originally thought effects, eat_seconds, using_converts_to were just split from food component to consumable component, so please help me close the ticket

Comments 1

This is not a valid report. The reason for your issue is that the minecraft:consumable component doesn't have any of the fields you've entered into it. The correct command would be this:

/give @s tnt[consumable={consume_seconds:0.05,on_consume_effects:[{type:"minecraft:apply_effects",effects:[{duration:600,id:"minecraft:wither",amplifier:1,ambient:true,show_icon:true,show_particles:false}],probability:1}]},use_remainder={id:"minecraft:stone",count:1},food={can_always_eat:true,nutrition:10,saturation:20}]
{\code}

Bee

(Unassigned)

Unconfirmed

(Unassigned)

24w34a

Retrieved