Pillager patrols spawn during raids. This causes glitchy behavior with the Bad Omen effect in the raid if you kill the patrol captain which is not part of the raid. This occurred while I was in a "sky village" (a villager, bed, and a bell in the sky with no solid blocks for the raiders to spawn on in order to make a raid farm), so this may be only reproduceable by doing this.
Steps to reproduce
This one is a bit difficult to reproduce (maybe "time consuming" would be better wording), but it definitely does have solid reproduction steps
- Place a small glass (3x3x3 will do just fine) box up in the sky (not too high or you'll trigger an infinite raid loop)
- Place a bed and a bell inside the box
- Spawn a villager in the box.
- Spawn in a bunch of pillagers until one is a patrol captain
- Kill all the pillagers
- Go to the sky village to start the raid
- Kill all but one raider
- Trap the last raider of the first wave in a boat so they don't despawn but can't attack anyone and don't kill them so they don't start the next wave.
- You may need to go to the ground, but do not let your x or z coordinate depart from the village by too much. Make sure you can still see the raid bar at all times to ensure you are close enough to be considered in the raid. (You may not be able to trade during this time as there is still an ongoing raid)
- Wait for a few hours but don't afk or you'll miss it. Eventually a patrol will spawn nearby. This is contrary to normal behavior that patrols cannot spawn whilst the player is in a village.
- Kill the patrol leader. You will get Bad Omen
Possibly intended (though I doubt it giving you Bad Omen is intended).