Minecraft wiki entry for Piston_uses, associated text: When a piston moves a block into the same space, as the head of a mob or the player, the entity takes damage from suffocation. Tunnels work well for this type of trap because the area is small and can hide the components.