Minecraft – How to stop pillagers from spawning

minecraft-bedrock-edition

I have a little lake next to my house in my survival world, but every other day a group of pillagers including a patrol captain are just resting there so now I have like 20 illiger banners.
I'm tired of having to kill them off all the time. Is there anything I can do?
Why is this happening?

Best Answer

Adding on to @Hari5000's answer, you could mob-proof the area around your base, by putting carpets or slabs surrounding the home. That way, pillagers and other mobs won't spawn around your base, though the area beyond the mob-proof area may spawn patrols or other hostile mobs.