Minecraft wiki entry for Enchanting_mechanics, associated text: The 2-high space between the bookshelf and table must be air (even a torch, snow cover or carpet blocks the effect), where "between" is as shown in the following diagrams (the white spaces are air, and the do not matter):