Minecraft wiki entry for Enchanting_mechanics, associated text: In order to have an effect, a bookshelf must be placed exactly 2 blocks, laterally, off the enchanting table and be on the same level or one block height above the table. Additionally, the bookshelf must not be blocked. The meaning of "blocked" differs on Java Edition and Bedrock Edition.