Stalker Creepers Mod — Guide
Mechanics
The mod operates on a logic check that runs every tick for every Creeper within a certain radius of a player.
Line of Sight (LoS) Logic
The core mechanic relies on a mathematical check of the player's facing vector. 1. Proximity Check: The Creeper first determines if it is within the "Stalking Zone" (typically within 16 blocks of the player). 2. Orientation Check: The mod calculates the angle between the player's forward-facing vector and the vector pointing toward the Creeper. 3. State Switch: * If the angle is wide (Creeper is behind or to the side of the player), the Creeper remains in Stalk Mode. * If the angle narrows (Player looks toward the Creeper), the Creeper switches to Attack Mode.
Multiplayer Compatibility
In multiplayer environments, the Stalker Creeper logic is calculated per player. If multiple players are near a single Creeper, the Creeper will prioritize stalking the player who is currently looking away. If one player looks at the Creeper while another is being stalked, the Creeper may initiate its explosion, potentially harming the player who never saw it coming.

Mob Behavior
The mod does not add a new mob entity but instead overwrites the AI tasks of the standard Vanilla Creeper. All existing Creeper variants (including Charged Creepers) inherit these new behaviors.
The Stalker Creeper
| Attribute | Detail |
|---|---|
| Health | 20 (x10 Hearts) |
| Spawn Rate | Identical to Vanilla Creeper |
| Movement | Standard walking speed, but uses stealth-based pathfinding |
| Primary Drop | Gunpowder (0-2) |
| Rare Drop | Music Discs (when killed by a Skeleton) |
Behavioral Changes
- Stealth Pathfinding: Unlike standard Creepers that take the most direct route to the player, Stalker Creepers attempt to maintain a position that is not directly in the player's line of sight. They are programmed to "shadow" the player's movements.
- The Stalking Phase: When a Creeper detects a player, it enters a stalking state. It will follow the player at a consistent distance. If the player moves, the Creeper moves; if the player stops to mine or craft, the Creeper closes the gap silently.
- Suppressed Fuse: The standard "hissing" sound and white-flash fuse animation are suppressed while the Creeper is stalking. This allows the mob to get within point-blank range without alerting the player.
- Detection Trigger: The explosion sequence is hard-coded to the player's Field of View (FOV). If the Creeper is within its detonation radius and the player's camera rotates to face the Creeper, the stalking phase ends and the explosion becomes inevitable.
