Started by
skLatvia
on
Topic category: Help with MCreator software
I'm making a mod which adds more enchantments, and want to add a machine where if you put an enchanted item in, it extracts the item onto a book. Any way on how to do this?
Here is what I came up with:
https://drive.google.com/file/d/1aVEJSkeisNI5fdf0VvV25QcgoF6ydf_T/view?usp=sharing
It uses commands to copy the enchantments from the tool to the book. Here are the commands for you to copy into your procedure (all the text inside the " "):
"data modify block ~ ~ ~ Items[{Slot:1b}].tag.StoredEnchantments set from block ~ ~ ~ Items[{Slot:0b}].tag.Enchantments"
"data remove block ~ ~ ~ Items[{Slot:0b}].tag.Enchantments"
For the GUI I made, the tool would go into slot 0, and the book goes into slot 1. If your items are in different slots, make sure to change the underlined numbers in the commands.
Sick. I'll try this out.
Thank for the code ! :D It worked for me ! ^^