How to make machine which extracts enchantments onto a book?

Started by skLatvia on

Topic category: Help with MCreator software

Last seen on 23:39, 8. Mar 2023
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make machine which extracts enchantments onto a book?

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?

Last seen on 14:30, 2. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is what I came up with:…
Tue, 11/03/2020 - 16:04

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.

Last seen on 23:39, 8. Mar 2023
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sick. I'll try this out.
Wed, 11/04/2020 - 19:42

Sick. I'll try this out.

Last seen on 14:33, 1. Jan 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank for the code ! :D It…
Tue, 02/15/2022 - 17:12

Thank for the code ! :D It worked for me ! ^^