Woot

Woot

24M Downloads

Injection Press Enchanted Books Not Usable

EntropyParadigm opened this issue ยท 3 comments

commented

Using the Injection Press to generate enchanting books cannot be applied to items in an anvil - this might be NBT related:
image
vs actual Smite V book:
image

Playing ATM6 (1.3.3)

commented

Enchanted books always seem to cause me issues and it is down to the Enchantments vs StoredEnchantments - I though I had it right this time.

There are two ways to apply enchantments one is ItemStack.addEnchantment (Enchantments NBT) and a special one for EnchantedBookItem.addEnchantment (StoredEnchantments NBT). Looks like I'm using the wrong one again .

commented

Fixed - output books now have the following NBT style straight from EnchantedBookItem:
Validated by using each of the test produced books in anvil with a diamond sword.

{id: "minecraft:enchanted_book", Count: 1b, tag: {StoredEnchantments: [{lvl: 1s, id: "minecraft:power"}]}}
{id: "minecraft:enchanted_book", Count: 1b, tag: {StoredEnchantments: [{lvl: 2s, id: "minecraft:quick_charge"}]}}
{id: "minecraft:enchanted_book", Count: 1b, tag: {StoredEnchantments: [{lvl: 3s, id: "minecraft:loyalty"}]}}
{id: "minecraft:enchanted_book", Count: 1b, tag: {StoredEnchantments: [{lvl: 4s, id: "minecraft:sharpness"}]}}
{id: "minecraft:enchanted_book", Count: 1b, tag: {StoredEnchantments: [{lvl: 5s, id: "minecraft:power"}]}}
commented

Fixed in 1.0.2.1