#Item NBT

1 messages · Page 1 of 1 (latest)

mighty river
#

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.

edgy lake
#

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)

mighty river
#

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

edgy lake
#

oh yoou use optifine

#

i see

vocal sequoia
#

EnchantmentStorageMeta

mighty river
#

is there a way to add that to deluxemenus?

vocal sequoia
#

not currently, no

mighty river
#

ah okay then

#

thank you

edgy lake
vagrant vector
mighty river
#

should I use nbt or just enchant my books

vagrant vector
#

same

#

enchantments:

  • enchant;level
#

I believe

#

let me check

#

yeah

#
enchantments:
- 'enchantment;level'```
mighty river
#

Great, I'll let you know in a couple of minutes

#

thank you

vagrant vector
#

your example would be

enchantments:
- 'LUCK_OF_THE_SEA;3'
vagrant vector
mighty river
#

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

vagrant vector
#

well at the moment you're not able to post complex nbt tags and it will take a bit until we'll add that.

vagrant vector
#

if this doesn't work either, I have one more possible solution.

mighty river
#

restarting

vagrant vector
#

omg

mighty river
vagrant vector
#

I messed up 🤣

#

1 second

#

it won't work

#

I know why

mighty river
#

oh

#

okay

#

xd

mighty river
#

maybe you did everything right last time but I'm just stupid so I have to double check

vagrant vector
#

yeah it looks correct

#

I wasn't actually ever applying the new enchantments

#

it was still the old code running

mighty river
#

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

vagrant vector
#

hmm

mighty river
#

nope :/

vagrant vector
#

alright. give me just a bit. I'll start a test server and see what's going on

vagrant vector
mighty river
#

the texture works now, is there a way to hide enchantment from lore?

#

hide_enchantments: true isn't working

vagrant vector
#

I don't think there is with this. since it this enchantment is stored differently

mighty river
#

ah nvm then

#

Thank you so much