Wandering Raider โ Full Plugin Design Document
Overview
Wandering Raider is a Minecraft plugin that transforms vanilla raiders (pillagers, vindicators, evokers, ravagers, etc.) into dynamic, world-roaming threats. Instead of raids only triggering when a player enters a village with Bad Omen, Wandering Raiders introduces autonomous raider patrols, roaming war bands, and siege events that emerge organically from the world โ hunting players, targeting villages, and establishing encampments.
Core Concept
The central idea is that raider factions behave like a living military force. They patrol territories, scout locations, send scouts ahead of their war bands, establish camps, and launch coordinated attacks โ all without requiring any player action to trigger them. The world feels dangerous and alive.
1. Raider Factions & Hierarchy
Faction Structure
Each active raider group belongs to a Faction โ a named, persistent group with its own properties.
Faction Name โ Randomly generated (e.g., "The Iron Fang Pillagers", "Dusk Raiders of the East")
Faction Tier (1โ5) โ Determines strength, size, and loot quality. Tier scales up over time if the faction is left unchallenged.
Faction Captain โ A specially named mob with a banner that serves as the AI "leader." If the captain is killed, the faction suffers a Morale Break (all members flee temporarily and the faction degrades one tier).
Faction Territory โ A defined radius (configurable) around their home camp. They patrol within this and react aggressively to intrusions.
Faction Composition by Tier
TierMembers13โ5 Pillagers25โ8 Pillagers + 1 Vindicator38โ12 Pillagers + 2โ3 Vindicators + 1 Ravager410โ15 mixed + 1 Evoker + 2 Ravagers5Full war band: 15โ20 mixed + 2 Evokers + 3 Ravagers + Witches
2. World Spawning & Camp System
Raider Camps
Factions spawn anchored to a Camp โ a small procedurally placed structure in the world.
Camps spawn in: Dark Forests, Plains, Savannas, Taiga, and Badlands biomes.
A camp consists of: 1โ3 tents (wool/wood structures), a central bonfire, loot chests, and a Faction Banner (custom banner pattern) planted in the ground.
The camp persists in the world even if all members die. A new group will respawn at the camp after a configurable cooldown (default: 3 in-game days) unless the camp is destroyed (the banner is broken).
Destroying the banner triggers a Revenge Wave โ a larger-than-normal group spawns immediately and hunts the player who broke it.
Camp Placement Rules
Minimum distance between camps: configurable (default 1500 blocks)
Maximum active camps per world: configurable (default 10)
Camps never spawn within 300 blocks of a village (to avoid instant raids)
Camps never spawn within 200 blocks of a player's spawn point
3. AI Behavior States
Each raider group operates on a Finite State Machine with the following states:
๐ต IDLE
Members mill around camp. Guards patrol a small radius.
Occasionally, one pillager "scouts" โ walks 100โ200 blocks in a random direction and returns.
๐ก PATROL
The group moves along a procedurally generated patrol route (3โ5 waypoints within their territory).
They follow roads/paths if detected nearby (checks for path blocks).
Speed is slow. They will notice players within ~20 blocks and transition to ALERT.
๐ ALERT
The group stops. All members face the detected entity.
A horn sound plays (custom sound or existing Minecraft sound).
If the player comes within 12 blocks or attacks, they transition to HOSTILE.
If the player leaves the area for 30 seconds, they return to PATROL.
๐ด HOSTILE
The full group charges the player. Ranged units keep distance; melee units close in.
The captain hangs back slightly, "commanding" (buffs nearby raiders with Speed I or Strength I via potion effect).
If the player runs far enough away (configurable escape radius, default 80 blocks), half the group returns to camp and half "chases" for an additional 60 blocks before giving up.
โซ RAID MODE
Triggered when a faction detects a village within range of a patrol.
The full faction marches toward the village and launches a vanilla-style raid (or a custom one if configured).
This happens without the player needing Bad Omen โ it's an organic world event.
A configurable raid horn sound and title message announces it to nearby players: "The [Faction Name] march on [Village Name]!"
๐ฃ RETREAT
Triggered if more than 50% of the group is killed and the captain is dead.
Survivors scatter in random directions, dropping lower-quality loot.
They regroup at camp after 5 minutes if they survive.
4. Scout System
Before a full faction moves into RAID MODE, they may send a Scout ahead.
A single fast pillager (Speed II) is dispatched toward a detected village or player base.
The scout does not attack โ it observes and returns.
If the scout returns to camp (reaches within 10 blocks of the bonfire), the faction gets an Intelligence Buff: the raid group gets Resistance I for the first 60 seconds of the raid.
If the scout is killed, the faction gets Anger โ they move faster and deal slightly more damage during the raid.
Players can identify scouts by their unique custom name tag (e.g., "[Faction Name] Scout") and the fact that they flee rather than fight.
5. Player Notoriety System
The plugin tracks each player's Notoriety score โ a hidden stat representing how much of a threat the raiders consider them.
Notoriety Gain
ActionNotoriety GainedKilling a pillager+5Killing a vindicator/evoker+15Killing a faction captain+50Destroying a camp banner+75Completing a raid defense+30
Notoriety Thresholds & Effects
LevelThresholdEffectUnknown0โ49No special attentionWatched50โ149Scouts occasionally follow the player from a distanceHunted150โ299Patrols will actively seek out the player's last known locationEnemy of All Pillagers300โ499A Bounty War Band (Tier 4 group) is dispatched specifically for the playerArch-Enemy500+A Legendary Captain (custom boss-level mob) is spawned and relentlessly pursues the player
Notoriety Decay
Notoriety decays by 2 points per in-game day of inactivity.
Players can also reduce notoriety by trading with a Villager Cleric (symbolizing "going into hiding").
6. The Legendary Captain (Boss Mob)
When a player reaches Arch-Enemy status, a Legendary Captain is spawned โ a one-of-a-kind custom boss.
Properties
Custom name: "[Player Name]'s Doom โ [Random Title]" (e.g., "SteveDoom โ The Ironclad Reaper")
Health: 150 HP (configurable)
Armor: Full Iron with custom-enchanted pieces
Weapons: Enchanted axe (Sharpness III, Knockback II)
Has a personal banner that is unique to their faction
Moves at normal speed but teleports to within 100 blocks of the player every 10 minutes if the player is online
On death: drops a Trophy Item (a custom player head or a named banner) and resets the player's notoriety to 0
Announces their arrival with a Boss Bar (dark red, custom name)
7. Raider Economy & Loot
Camp Loot Chests
Camps always contain chests with loot scaled to faction tier:
Tier 1โ2: Arrows, bread, leather armor pieces, iron nuggets
Tier 3โ4: Crossbows, iron armor, emeralds, enchanted books (low-level)
Tier 5: Diamond tools, high-level enchanted books, totems of undying (rare), illager map (see below)
Illager Map
A special loot item found in high-tier camps. When used (right-clicked), it reveals the location of the nearest undiscovered Tier 5 camp on the player's map, functioning like an Explorer Map.
Pillager Dog Tags
Every raider drops a Dog Tag item โ a named piece of paper indicating which faction they belonged to. Collecting 10 dog tags from the same faction and bringing them to a village's Cartographer gives the player a discount at that village and a small XP reward. It also reduces notoriety slightly.
8. Village Integration
Village Threat Level
Each village in the world has a hidden Threat Level (0โ100) that rises when:
A camp spawns within 800 blocks (+20)
A faction patrol passes within 200 blocks (+10 per pass)
A previous raid occurred (+30)
When Threat Level reaches 100, the next patrol that detects the village automatically enters RAID MODE, no player involvement needed.
Village Defense Quests
When a village reaches Threat Level 50+, village Iron Golems display a particle effect (red smoke) around them. Right-clicking a villager with a sword in hand triggers a dialogue:
"Strangers threaten our home. Will you defend us?"
Accepting gives the player a Defense Contract โ a paper item with the village's coordinates. Defending the village from the next raid (being within 150 blocks when the raid completes) gives:
Configurable reward chest spawned in the village center
+20 village reputation
Notoriety reduced by 25
9. Configuration File (config.yml overview)
yamlwandering-raider:
enabled: true
max-camps: 10
camp-respawn-days: 3
min-camp-distance: 1500
patrol-radius: 300
hostile-chase-radius: 80
notoriety:
decay-per-day: 2
bounty-threshold: 300
arch-enemy-threshold: 500
legendary-captain:
health: 150
teleport-interval-minutes: 10
raid:
announce-title: true
announce-sound: true
factions:
tier-upgrade-days: 7 # Days before unchallenged faction upgrades tier
max-tier: 5
loot:
scale-with-tier: true
village-integration:
enabled: true
threat-level-decay-per-day: 5
debug: false
10. Commands & Permissions
CommandDescriptionPermission/wr statusShows active factions and their tierswanderingiraider.admin/wr campsLists all active camp locationswanderingraider.admin/wr spawn [tier]Force-spawns a faction near the callerwanderingraider.admin/wr notoriety [player]Shows a player's notoriety scorewanderingraider.admin/wr reloadReloads configwanderingraider.admin/wr mynotorietyLets a player check their own notorietywanderingraider.player
11. Events & API (For Developers)
The plugin fires custom Bukkit events for addon compatibility:
WRCampSpawnEvent โ Fired when a camp is placed
WRFactionRaidEvent โ Fired when a faction enters RAID MODE
WRPlayerNotorietyChangeEvent โ Fired when a player's notoriety changes
WRLegendaryCaptainSpawnEvent โ Fired when a Legendary Captain is summoned
WRCampDestroyedEvent โ Fired when a camp banner is broken
12. Technical Implementation Notes
All mobs are tracked via persistent data containers (PDC) on the entity, storing faction UUID, tier, role (captain/scout/grunt), and camp location.
Camps are stored in a custom flat-file database (YAML or SQLite, configurable) to persist across server restarts.
The AI FSM runs on a BukkitScheduler async task every 5 seconds per faction group to avoid main-thread lag.
Pathfinding uses the vanilla NMS PathfinderGoal system with custom goal priorities injected via reflection or a compatibility library (e.g., PacketEvents or Mojang-mapped NMS).
Village detection uses Bukkit's Raid API and structure location APIs to find village centers.