Started by
Coolmanz7
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to give a player an enchanted book with a certain enchant on it(ex. Sharpness V). I currently am getting a book and enchanting it but it doesn't work like other enchantments and isn't able to enchant items via anvil. I did the same thing with the enchanted book item and got the same result. All of the other forums on this haven't gotten an answer. Is there any way to give the player an enchanted book that is able to be used in an anvil?
/give @p enchanted_book{StoredEnchantments:[{id:insert_your_enchantment_here,lvl:insert_level_here}]}
That works perfectly. How would I make it a random enchantment without way too many if else statements?