Custom Enchanted Books

Started by butterysticky on

Topic category: Help with MCreator software

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Enchanted Books

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.

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Having same problem, note…
Fri, 11/25/2022 - 16:02

Having same problem, note that enchanted book enchants are located in a NBT JSON object tag directory `tag.StoredEnchantments`, so it cannot be accessed via standard blocks.