Minecraft wiki entry for Bad_Omen, associated text: Bad omen can be inflicted only on players and tamed wolves when they kill an illager captain (except those that spawn in raids in Java Edition). A tamed wolf killing an illager captain gives their player the bad omen effect. Other mobs that kill an illager captain do not get the effect, although they can still get the effect via commands, but cannot start a raid when in a village. This also goes for any other illagers that kills an illager captain, including arrows shot by a pillager or an illusioner.