#Remove a item component with Item Modifiers

1 messages · Page 1 of 1 (latest)

lean burrowBOT
#

Hello!

I am trying to remove the consumable component of an item, but even if I put an empty object, the item is still consumable, the only way I have to prevent it from being consumed is to set consume_seconds to 999999999, but when I right click it keeps doing a little animation, if someone knows how to completely remove the component, it would help me a lot!

I thought about copying the item to an entity and removing the component, but the command is running on every tick, it would be very time consuming to replace the item to the player and remove the component constantly.

/data get entity @s SelectedItem.components.“minecraft:consumable"
{
    "function": "minecraft:set_components",
    "components": {
        "minecraft:consumable": {}
    }
}

any ideas? 😄

real scarabBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1739368360:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

raven flume
#

Remove a item component with Item Modifiers

neat shoal
#

i don't know a lot of it but maybe you need to set the component to zero (sorry that i'm not that usefull)

raven flume
#

if I add any data other than a {} object to the component, the item modifier does not appear to exist, but I appreciate the idea!

neat shoal
#

in wich version are you working?

late heart
#

To remove a component, you do "!minecraft:consumable": {}

raven flume
#

THATS WORK, ty!!!