Minecraft wiki entry for Shulker_farming, associated text: When a shulker tries to teleport (including when it is hit by a shulker bullet) it will try up to 5 random locations in a 17x17x17 region around itself and test if they are valid spots for it to sit on. For a spot to be valid, it needs to be an air block, have a solid face for a shulker to sit on, and have a collisionless block opposite the solid face for the shulker to extend its head into.