Minecraft wiki entry for Carpet, associated text: If a carpet is placed so that it lays on top of a hopper, the hopper can still collect items through the carpet. This is because hoppers can collect items from less than a full block above in Java Edition, or less than 3⁄4 of a block above in Bedrock Edition.