Custom Enchanted Books

Started by butterysticky on Sun, 02/21/2021 - 04:59

Topic category: Help with MCreator software

Last seen on 08:50, 19. Feb 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom Enchanted Books
Sun, 02/21/2021 - 04:59

So I have a custom crafting block/GUI that I want to be used to make enchanted books with higher levels. For example, when it is right clicked with a book & quill and the proper items in the proper slot, a Sharpness 6 book will be placed in the blocks output slot.

So to do this, I made an itemstack variable that I set in the block's inventory when the requirements are met. But the problem is editing the NBT data of the enchanted book item, the "id" and "lvl" nbt tage are subtags, so idk how to fit them into the NBT text tag. I tried Set NBT text tag "StoredEnchantments" of itemstack to "id:sharpness,lvl:6" with all sorts of syntax, and i tried setting the lvl and id tags separately but it always gives me a blank enchanted book when I run the procedure.

Last seen on 16:13, 28. May 2022
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think you can try to do…
Sun, 02/21/2021 - 09:21

I think you can try to do this with the [create text with:] procedure block and commands. you basically have the text tag with the "id:sharpness,lvl:6" inside of it and create a command combining the value of the text tag with the command.