1.0.2
Compatibility
Changes
Villager Panic 1.0.2
New Features
-
Added Cornered behaviour for villagers whose doorway or escape route is blocked.
-
Added indoor retreat behaviour for cornered villagers.
-
Cornered villagers now retreat deeper into buildings and toward safer corners.
-
Added custom scrambling movement across:
- Beds
- Chests
- Stairs
- Slabs
- Carpets
- Other raised interior blocks
-
Added precise sub-block retreat positions for very small houses.
-
Added
CORNEREDandLOCKDOWN_CORNEREDpanic states. -
Added an Adrenaline and Injury system:
- Every successful nonlethal hit grants 2.5 seconds of adrenaline.
- Adrenaline increases movement speed by 50%.
- Additional hits restart the adrenaline duration.
- Hits that leave a villager below half health cause a lasting injury.
- Injured villagers move at half speed after adrenaline ends.
- Fully healing a villager removes the injury slowdown.
-
Adrenaline and injury information now persists through chunk unloads and server restarts.
-
Added support for hiding inside enclosed village buildings without beds.
-
Added a shelter reservation system to distribute villagers between available buildings.
-
Added player rediscovery behaviour for villagers already hiding.
-
Added lockdown versions of freezing and cornered behaviour.
Gameplay Changes
-
Completely rewrote the core panic AI using dedicated panic states:
- Calm
- Fleeing
- Hiding
- Shocked
- Cornered
- Lockdown Fleeing
- Lockdown Hiding
- Lockdown Shocked
- Lockdown Cornered
-
Villagers now remember the actual player responsible for the panic.
-
Normal panic now primarily affects villagers who witness a player-caused villager death.
-
Initial witness panic is limited to nearby villagers with direct line of sight.
-
Village-wide panic remains exclusive to Lockdown Mode.
-
Increased freeze chance to 30%.
-
Removed the previous separate 80% baby villager freeze chance.
-
Villagers must now have completed an escape before they can freeze when rediscovering the player.
-
Freeze chance is rolled only once per encounter.
-
Frozen villagers now face the threatening player while visibly shaking.
-
Frozen villagers resume fleeing when the player moves more than six blocks away.
-
Hidden villagers can detect the threatening player within eight blocks.
-
Multiple visibility rays are now used to improve detection through open doorways.
-
Solid walls and closed doors continue to block player detection.
-
Villagers now play one startled sound when they rediscover the threatening player.
-
Villagers prefer houses with beds but can use valid bedless buildings as fallback shelters.
-
The following are now rejected as hiding places:
- Outdoor farms
- Bells
- Animal pens
- Exposed workstations
- Open shelters
- Roof overhangs
-
Hiding positions must now be:
- Enclosed
- Sheltered
- Reachable
- Physically valid
-
Villagers now spread between available shelters instead of repeatedly selecting the same house.
-
Villagers now select temporary escape positions when no valid shelter can be reached.
-
Escape targets must increase distance from the threatening player.
-
Villagers can no longer select their current position as a successful escape.
-
Doors remain open while another fleeing villager is approaching.
-
Villagers close doors after reaching safety.
-
Villagers cannot enter the Hiding state while standing inside a doorway.
-
Villagers retreat when the threatening player blocks an entrance.
-
Cornered villagers wait for an escape route instead of repeatedly running into the player.
-
Cornered villagers continue watching the threatening player.
-
Villagers resume fleeing when the doorway or another escape route becomes available.
-
Normal panic continues to last for 90 seconds.
-
Qualifying panic events can refresh the panic duration.
Lockdown Changes
- Lockdown Mode still requires two player-caused villager deaths.
- Both kills must now be caused by the same player.
- Both kills must occur in the same dimension.
- Both kills must occur within the same general village area.
- The second kill must occur within five minutes of the first.
- All villagers inside the lockdown area attempt to hide.
- Newly loaded and newly spawned villagers are added to active lockdowns.
- Villagers remain hidden until the responsible player leaves the wider village boundary.
- Iron golems gain persistent anger toward the responsible player.
- Additional villager deaths refresh nearby villagers and golems.
- Additional kills no longer unnecessarily reset existing villager paths.
- Increased lockdown coverage for large and elevated villages.
- Added a larger exit boundary to prevent lockdown from rapidly switching on and off.
- When lockdown ends, only panic and golem anger associated with the responsible player are cleared.
Villager Behaviour Changes
-
Panicking villagers refuse to sleep.
-
Panicking villagers refuse to trade.
-
Panicking villagers do not perform normal trade restocking behaviour.
-
Panicking villagers do not walk to their workstations.
-
Vanilla villager AI can no longer easily replace active panic destinations.
-
Custom panic routes are restored if vanilla AI redirects a villager toward a workstation.
-
Villager professions and job-site information are preserved after panic ends.
-
Ordinary villager vocal sounds are suppressed during panic.
-
The following sounds remain audible:
- Hurt sounds
- Death sounds
- Intentional player-rediscovery sounds
Terrain and Pathfinding Improvements
- Improved panic movement in mountain villages.
- Improved panic movement in high-elevation villages.
- Improved movement through snowy villages.
- Improved movement across stairs.
- Improved movement across slabs.
- Improved movement across village paths.
- Improved movement across bridges.
- Improved movement across beds.
- Improved movement across chests.
- Improved movement across carpets and thin surface blocks.
- Villagers can now scramble onto raised furniture when sufficient headroom exists.
- Village and lockdown coverage now prioritizes horizontal distance.
- Villagers on different elevations within the same village are less likely to be incorrectly excluded.
- Added fallback escape positions when no shelter can be reached.
- Active panic paths are retained instead of being recalculated continuously.
- Stalled villagers are detected and assigned new targets when necessary.
Optimizations
- Staggered player rediscovery and visibility checks between villagers.
- Lockdown maintenance now runs once per second instead of every server tick.
- Invalid shelter candidates are filtered before expensive pathfinding checks.
- Enclosure scans and shelter path attempts are limited.
- Active lockdown villagers no longer have their paths repeatedly reset.
- Valid shelter and escape paths are retained for longer.
- Panic data is removed when villagers die or unload.
- Shelter reservations are removed when villagers die or unload.
- Shelter reservations are released when a villager abandons a target.
- Shelter reservations are released when panic ends.
- Reduced repeated pathfinding during large village panic events.
Bug Fixes
- Fixed villagers entering Hiding before physically reaching a shelter.
- Fixed villagers treating their starting position as a successful escape.
- Fixed villagers hiding outdoors.
- Fixed villagers hiding underneath simple roof overhangs.
- Fixed villagers selecting outdoor farms as shelters.
- Fixed villagers selecting bells as shelters.
- Fixed villagers selecting exposed workstations as shelters.
- Fixed villagers selecting unreachable hiding positions.
- Fixed villagers repeatedly walking toward failed targets.
- Fixed villagers becoming stuck when no valid house is available.
- Fixed pathfinding failures incorrectly triggering freeze behaviour.
- Fixed villagers repeatedly rerolling the freeze chance while trapped.
- Fixed villagers repeatedly running into players blocking doorways.
- Fixed villagers standing indefinitely inside doorways.
- Fixed villagers stopping one block short of their selected retreat position.
- Fixed villagers remaining unnecessarily centered inside small houses.
- Fixed cornered villagers failing to move across beds.
- Fixed cornered villagers failing to move across chests.
- Fixed cornered villagers failing to climb stairs.
- Fixed cornered villagers failing to climb slabs.
- Fixed carpets being treated as full blocks.
- Fixed carpets being treated as solid walls.
- Fixed carpet edges stopping retreating villagers.
- Fixed vanilla workstation behaviour replacing panic navigation.
- Fixed villagers turning around during panic to return to work.
- Fixed stale shelter reservations after villagers die.
- Fixed stale shelter reservations after villagers unload.
- Fixed multiple villagers repeatedly selecting the same shelter.
- Fixed doors repeatedly opening and closing during panic.
- Fixed doors closing while another fleeing villager is still approaching.
- Fixed villagers declaring themselves hidden while standing in a doorway.
- Fixed hidden villagers failing to detect players through open entrances.
- Fixed doorframes making player visibility checks unnecessarily unreliable.
- Fixed lockdown states being cleared for the wrong threatening player.
- Fixed golem aggression being inconsistently maintained during lockdown.
- Fixed distant or unrelated kills incorrectly contributing to lockdown.
- Fixed elevated villagers being excluded from village-wide lockdown.
- Fixed normal villager movement competing with panic movement.
- Fixed ordinary villager sounds continuing to play while panicking.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:leZCEhm0:nwPyWB21"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:leZCEhm0:nwPyWB21"
}

