Started by
Namorist
on
Topic category: Help with Minecraft modding (Java Edition)
I've been trying to make an item turn into an enchanted book, and since by default it has no stored enchants, I tried to edit it's NBT text tag, and it didn't work.
Here's what I'm trying to achieve:
Here's what I'm getting:
Here's the procedure:
Maybe you can try it by using a loot table?
loot tables won't let you set NBTs on any item
I like to assign a variable called "randomness" instead of straight up comparing it to random [0,1). Try that. I'll also be here trying to find a procedure that works too!
Oh wait i misunderstood the problem¯\_(ツ)_/¯
If what the problem is colour, then use §. § is a thing where, in Minecraft, if you put it in with another digit like a or 1 or something, it and the digit will become invisible and all the text after it will be coloured. To get it on Windows, Windows key + period to get all the emojis, kaomojis, and symbols. Go to symbols, and you'll find it in the general puncuation section. On Mac, its alot simpler. Alt + 6 will just put in sign simble.
Oh no wrong forum topic😲
Oh wait, try giving yourself a book and enchant that.
I think there is a procedure block that lets you specify what enchants to put on something, even when the enchants normally wouldn't work on that item. I think that could allow you to use an itemstack local variable, set it to enchanted book, then add the enchant(s) to the variable item, before giving that to the player, or setting the item in their hand to the variable
Thats what i said!