#recover the lore of an item and then store it to put it back in the spell book and minecart

1 messages · Page 1 of 1 (latest)

versed iron
#

hi
directly linked to : "retrieving information from a GUI" post
I'd like to recover the lore of an item and then store it to put it back in the spell book and minecart each time.
can you help me
I've seen a lot of commands but it didn't do what I wanted.

wise spruceBOT
#
Someone will come and help soon!

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

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

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

pine quartz
#

you can get the lore with the data command

#

for example, you already have a data storage to save the lore data and the item in your main hand:

data modify storage namespace:lore MyLore set from entity @s SelectedItem.tag.display.Lore
versed iron
#

I have no data storage except my chest minecart

pine quartz
#
data modify entity @e[type=chest_minecart,tag=item_holder,limit=1] Items insert 0 from entity @s SelectedItem.tag.display.Lore
versed iron
#

ty

#

I should be able to make it with this thanks and have a nice day.