No, there wasn't a hopper
I've also been dealing with pillagers spawning inside villages. Is there any way to stop pillagers from spawning besides slabs? I've heard people saying that they can only spawn on block light level 0-7, but I also heard that pillager patrols can spawn in any skylight and block light.
so is there any way to prevent the pillagers from spawning like using block light?
No, I just recently went mob hunting for endermen. There were a lot of hostile mobs spawning.