Enchanted Book

An enchanted book is an item that lets players add enchantments to certain items using an anvil.

Fishing
Enchanted books can be obtained as a "treasure" item from fishing with a fishing rod as part of the "treasure" category. The book has the equivalent of a level 30 enchantment from an enchantment table, but treasure enchantments are available and the chance of multiple enchantments is not reduced.

Trading
Librarian villagers have a 50% chance to sell enchanted books as part of their trades at novice, apprentice, and journeyman-level, and have $1/3$ chance to sell enchanted books at expert-level as part of their trades, meaning each librarian villager can sell up to four books. They are bought for 1 book and 15-64 emeralds, based only on the level of the enchantment (for example, Infinity and Protection I both cost 15-19 emeralds), although treasure enchantments (such as Mending) double the cost.

Librarian villagers have a $2/3$ chance to sell enchanted books as part of their trades at the novice, apprentice, and journeyman level, and have a 50% chance to sell an enchanted book at the expert level, meaning each librarian can sell up to four books. They are bought for 1 book and 5-64 emeralds, based only on the level of the enchantment (for example, Infinity and Protection I both cost 5-19 emeralds), although treasure enchantments (such as Mending) double the cost.

They may contain any available enchantment at any available level. See trading for more information on enchantments and prices.

Drops
Vindicators and pillagers that spawn from raids have a small chance to drop an enchanted book with a level 30 enchantment, which may be a treasure enchantment.

Enchanting


Players can create an enchanted book by enchanting a book on an enchantment table. Books have a decreased chance of getting multiple enchantments (specifically, if multiple enchantments would be added, then one is removed at random), and have a lower "enchantability level" than most other items. Treasure enchantments such as Mending cannot be obtained from an enchantment table.

Bartering
Players can barter with piglins by using or throwing gold ingots, and doing so has a 1⁄417 chance for piglins to throw an enchanted book with Soul Speed I-III. This is the only way to acquire an enchanted book with Soul Speed, as the enchantment cannot be obtained through enchanting, fishing, trading or chest loot other than bastion remnant chest.

Usage
In Survival, enchanted books are the only method to obtain certain enchantments on certain tools, such as Unbreaking on shields. Enchanted books have a shine effect on their sprite.

To use an enchanted book, the player must place an item in the first slot in an anvil, and a book in the next. In order to complete the enchantment, the player must have the required amount of experience. Note that using an enchanted book gets significant discounts at the anvil. Enchanted books themselves can be combined to create a single book with increased or multiple enchantments, similar to combining tools or weapons.

When combining items, the compatible enchantments from the book in the second slot are transferred to the item from the first slot, keeping the highest level of any type. If two enchantments have the same level and a higher level is available, they combine into the next level. If a book is applied to an item that can't take all of its spells, the appropriate spells are transferred, while the unusable ones are lost. Enchanted books are single-use.

Enchanted books do not exhibit their enchantment. For example, a book with Sharpness IV as an enchantment does no more damage than an un-enchanted book, or any non-weapon item, would when used as a weapon. An exception to this is the Silk Touch enchantment, which applies if used in a block that doesn't require a tool to be mined.

Available items
Enchanted books can enchant the usual items that can be enchanted at an enchantment table, but unlike an enchantment table, they are able to boost enchantments such as Sharpness or Thorns to their maximum power, and may apply the following enchantments to items:

Creative mode
The player can enchant any item with any enchantment in creative mode, allowing any applied effects to exhibit themselves. For example, a stick can be enchanted with Silk Touch to allow the player to successfully dig grass blocks. The enchanted item can still be used in Survival mode without any loss of enchantments.

Enchantments that are normally incompatible are still incompatible; for example, Piercing and Multishot cannot be both applied to the same item, even in Creative mode.

If a block is enchanted, it loses the enchantment upon being placed in the world.

Data values
Enchanted books have a data value of 403, and an ID name of. They use their item data to determine what enchantments are stored for enchanting in an anvil.

Item data
Enchanted books use an NBT tag  to indicate the enchantment. The allowed sub-tags are  and , equivalent to the format of the   tag that is used for enchantments applied to items.

''The following NBT structure is provided to show how the  tag is organized, and is not comprehensive above the   tag. The full NBT for an item can be found here.''


 * : The tag tag.
 * : The list of enchantments on this book.
 * An enchantment
 * : The enchantment name ID
 * : The enchantment level

Trivia

 * When obtained through the command with no stored enchantments, the enchanted book has no attached enchantments, but still shines as if it is enchanted.
 * A book enchanted with Unbreaking III appears in both the tools tab and combat tab of the creative inventory.