Topic category: Help with Minecraft modding (Java Edition)
I am trying to make a mod where you can get a mystery enchanted book, and when you right-click with it in your main hand, it's supposed to give you a random enchanted book. I did this by replacing the item in your main hand to an enchanted book, then adding a random enchantment. Here's the problem: It literally enchants the book! If it has silk touch and you mine a grass block with the book, it'll drop a grass block. same works with sharpness, fire aspect, and any other enchantment. I can't even use these books to enchant stuff in an anvil, because they technically don't have any enchantments on them. The book items themselves are enchanted though. Any help would be greatly appreciated. Thanks!