Java Edition:Knowledge Book
The knowledge book is an item normally only obtainable through commands. The knowledge book was obtainable in 2 April Fool's snapshots. The knowledge book is consumed when the use button is pressed (right-click by default), but no recipe is gained if it doesn't have the required NBT.
Obtaining
22w13oneBlockAtATime Enderman Spawning
In the April Fools' version 22w13oneBlockAtATime, endermen spawn with random blocks and random block states. The knowledge book cannot be directly spawned because it is an item, not a block. However, the generic_item_block that exists exclusively in this version has a block state for every single item in the game, including the knowledge book.
This means that the chance for an enderman spawning with the knowledge book is very rare. There are 902 equally likely blocks, and generic_item_block is just a 1/902 chance. Then, there are 1105 different values that the generic_item_block can be set to. So, for the knowledge book, the chance is a 1/902 * 1/1105 = 1/996710 (≈0.0001%) chance of it spawning.
23w13a_or_b Votes
The April Fool's snapshot 23w13a_or_b introduces a plethora of ways to obtain every block and item in the game, including the knowledge book. These include:
- The
egg_freevote, when applied, will allow chickens to lay any block or item in the game (without NBT). This means all chickens have the chance of laying the knowledge book. - The
give_itemvote, when applied, will give every online player a random amount of any block or item in the game (without NBT), meaning that you could have the knowledge book randomly given to you. - The
fish_anythingvote, when applied, will allow any item from the creative menu (not the operator tab, with NBT) to be fished (combine with thebuff_fishingvote to greatly increase fishing speed). What this means is that there is a chance that the knowledge book can be randomly fished. - The
replace_itemsvote, when applied, will replace all items in online players' inventories with any block or item in the game (NBT of the original replaced item is preserved). This allows for the knowledge book with any NBT. - The
replace_loot_dropvote, when applied, will replace all loot drops of a random block or item with any block or item in the game (if the original item that is being dropped has NBT, it will be preserved). This is also another method for the knowledge book with any NBT. - The
replace_recipe_outputvote, when applied, will replace all recipes for the given item with any block or item in the game (NBT is preserved if the original output item is supposed to have NBT.) This is yet another method for the knowledge book with any NBT. - The
villager_gemvote, when applied, will replace all emeralds in all loaded villager's trades with any block or item in the game (without NBT). This means that you can get a villager that trades the knowledge book, allowing for infinite amounts of the knowledge book. - The
basalt_gen_replace,cobblestone_gen_replace,obsidian_gen_replace, andstone_gen_replacevotes, when applied, replace the block of their respective fluid interaction with any block in the game, allowing for blocks in invalid positions and the placement of operator-only blocks such as the command block.