#(kristouffe) Components: Can we now make any item edible?

32 messages · Page 1 of 1 (latest)

primal marten
#

Trying to figure out how it works. Is this now possible with the component patch?

jovial portalBOT
#

(kristouffe) Components: Can we now make any item edible?

jovial portalBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

floral hollow
#

It's not implemented yet

#

There is an open feature request for this

simple obsidianBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@primal marten

primal marten
#

what is component_patch supposed to be? so that i can understand?

floral hollow
#

It also adds some fancy stuff like making any item edible

#

This is also one of the reason plugins that tinker with items need more time to update than usual

#
Minecraft Wiki

Data components, or simply components, are structured data used to define and store various properties. They are used on items, where they are referred as item components or item stack components, and block entities, partially replacing NBT format.
Data components are used in various places, including the player's inventory, container block enti...

sharp trench
#

Which, yeah technically that can be used for that until proper properties are added

#

But it's wont be as nice for script usage/fully supported across versions, see it's meta for more information

floral hollow
primal marten
#

Aaah so how would you do that with the actual dev build if it's possible now ? That was my initial question 😅

floral hollow
#

You could try giving yourself an item with Minecraft commands and run /ex narrate <player.item_in_hand.components_patch>

#

You might be able to get the NBT Enconding format through that

primal marten
#

Hmmm I think that will be a bit difficult to work with

#

the consumable map seems empty even if there are some things in it

sharp trench
#

What command did you use to make the item?

primal marten
#

/give @a acacia_button[consumable={nutrition:2,saturation:4,can_always_eat:1b},max_stack_size=20]

#

btw components_patch and full_components_patch have the same output

sharp trench
#

Well, depends on the item - in this case all of these components are persisted via the components patch property, so they'll be the same yeah

sharp trench
#

Something like
/give @p acacia_button[consumable={consume_seconds:3,animation:"spyglass",sound:"block.chain.break",has_consume_particles:true,on_consume_effects:[{type:"minecraft:play_sound",sound:"entity.enderman.teleport"}]}] 1
seems to work fine

primal marten
#

yeah you're right, Food and Consumable are 2 different components now

simple obsidianBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@primal marten