[Request/Idea] Enchanted Book Enchanting Block Compatibility

Started by CEntertain on Sun, 03/12/2023 - 17:30

Topic category: Feature requests and ideas for MCreator

Last seen on 19:57, 1. Jun 2023
Joined Mar 2023

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Request/Idea] Enchanted Book Enchanting Block Compatibility
Sun, 03/12/2023 - 17:30

I have seen a lot of topics discussing that adding, removing, or working with, enchantments in the Blockly editor does not work with book and enchanted_book items.
The reason that is the case seems to only be because any regular itemstack uses the "Enchantments" array tag, while enchanted books and books  use the "StoredEnchantments" array tag.

My suggestion would be one of the two following:

1.   Making it so that enchantment related blocks scan for whether someone uses a book or enchanted_book item to apply, remove, edit, or read an enchantment from any, then dynamically change from using the "Enchantment" array to using the StoredEnchantment array.
However, I see the problems with people using complicated setups or converting between blocks and items.

2.   The second method, which would work most definitely would be adding a secondary mode to the enchantment related blocks. The user would click on an edit symbol (similar to how you edit if-else blocks) which brings down a menu where you can switch between tool mode ("Enchantments" array tag) and book mode ("StoredEnchantments" array tag), and the two options change the array tag the block uses respectfully. This would open the possibility for people to use both, books and regular tools, with the enchantment blocks in the Blockly editor.