How to make machine which extracts enchantments onto a book?

Started by skLatvia on Tue, 11/03/2020 - 14:15

Topic category: Help with MCreator software

Last seen on 22:35, 13. May 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make machine which extracts enchantments onto a book?
Tue, 11/03/2020 - 14:15

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 21:29, 1. Jul 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 22:35, 13. May 2021
Joined Oct 2020
Points:

User statistics:

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

Sick. I'll try this out.