Hello, I'm trying to display luck of the sea 3 enchanted book in the gui, the nbt of that enchanted book is
{StoredEnchantments:[{id:"minecraft:luck_of_the_sea",lvl:3s}]}
Can someone help me add that nbt to the item? I've tried everything I could find (nbt_int, nbt_string, etc.), but it just doesn't work.
(I have custom texture for that book so I have to use NBT, I know I can just add the lore but that's not what I'm looking for)
Thank you.
#Item NBT
1 messages · Page 1 of 1 (latest)
does adding enchantments the normal way work on the book?
also, "have to use nbt" for the custom texture is separate from the enchantments
enchantments are nbt, name is nbt, lore is nbt, custommodeldata is nbt, etc.
You just need to apply custom model data for the custom texture and enchantments for the enchantments (if they work on books, which I believe they should)
Nope, adding enchantments the normal way just adds the glow
I have optifine textures which override vanilla ones (there's no custommodeldata)
That's why I have to use nbt tags to let the game know it's an enchantment book (in this case luck of the sea lvl 3) and replace the vanilla book texture with the one dedicated to that enchantment
sorry for pinging I just noticed that I didn't turn it off
nah, books have a special meta for enchantments
EnchantmentStorageMeta
is there a way to add that to deluxemenus?
not currently, no
Ya, I thought deluxemenus did that but I suppose not. Thought I’ve seen it before
@mighty river can you try this build and let me know if it fixes your issue?
sure, what would be the format for books?
should I use nbt or just enchant my books
same
enchantments:
- enchant;level
I believe
let me check
yeah
enchantments:
- 'enchantment;level'```
your example would be
enchantments:
- 'LUCK_OF_THE_SEA;3'
Please ping me. Thanks
@vagrant vector https://i.imgur.com/xrumpRU.png
it adds the enchantment, however the book texture is still vanilla
I need the texture to change (that's why I asked for nbt format)
I think it added the enchantment before as well when I tried using enchantments:, however I when I use nbt_string or int or whatever it doesn't work
well at the moment you're not able to post complex nbt tags and it will take a bit until we'll add that.
Yeah but it did it in a different way before. I'll give you one more build
if this doesn't work either, I have one more possible solution.
restarting
omg
can you just check if this is right
maybe you did everything right last time but I'm just stupid so I have to double check
yeah it looks correct
but I've messed up in code
I wasn't actually ever applying the new enchantments
it was still the old code running
nope, the texture is the same
It's a normal enchantment book, no enchants in the lore tho
I think that's the only difference to older versions
@vagrant vector not sure if I should ping you again
nope :/
alright. give me just a bit. I'll start a test server and see what's going on
Turns out I was wrong. LUCK_OF_THE_SEA is the wrong enchantment name. Try just LUCK
the texture works now, is there a way to hide enchantment from lore?
hide_enchantments: true isn't working
I don't think there is with this. since it this enchantment is stored differently