Phantom Omen Trigger

About

PhantomOmenTrigger is a Minecraft 26.2 datapack that restricts phantom spawning to specific conditions. Phantoms will only spawn when a player has the Bad Omen effect active, it is nighttime, and the player has direct sky access. The datapack continuously checks all players, verifying their status effect, time of day, and exposure to open sky before allowing phantom spawns. It prevents phantom spawns during the day, indoors, underground, or when the player lacks the Bad Omen effect. The system uses a tick-based scoreboard timer to efficiently manage spawn checks and uses advancement triggers to detect when players gain or lose the Bad Omen effect, ensuring precise and performant condition validation.