This is an unofficial fork and port of MrSterner's GuardVillagers. Find the original Fabric port here and the original Forge version here.
Note, if you are looking for a 1.21.1 version, please checkout https://modrinth.com/mod/guard-villagers-1.21.1 by brgrgrl. Note, I have not tested compatibility on migrating from this verion to any version I have forked. Will test soon and update my comment here!
Are you tired of your village dying off because its golem is too lazy?
Are you tired of essentially defending it all by yourself?
This mod adds Guards as a solution, as well as new villager-related AI changes.
Guards
These spawn in villages in groups of six, equipped with either an iron sword or a crossbow. They're prepared to fight any threat to the village (possibly including you!). To make new guards, shift + right click on a nitwit or unemployed villager with a sword or crossbow.
If you have hero of the village, they will gain the ability to follow and fight for you when you click the follow button, and right clicking them will open up the guard inventory, allowing you to give them armor, and swap out their weapons! For their offhand slot, you can either give them a shield, or some food. If they have a shield, they will use it to block attacks, crossbow guards with a shield won't be able to kick enemies if they're blocking. If they have food (or a potion), they will start eating or drinking if they are low on health. Clicking the patrol button will allow you to set patrol points for guards, melee guards will walk around the point while ranged guards will snipe enemies and stand still on their point.
You will only be able to gain access to their inventory if you have hero of the village.
AI Changes
- Witches attack villagers. *true by default
- In raids, illagers kill any animal they see. *false by default
- Villagers and Illagers are scared of polar bears. *true by default
- Clerics heal low-health guards, villagers, and players with Hero of the Village using regeneration potions, and smiths repair iron golems with ingots.
All Versions
+ Add Version1.21.10. No code changes in this release.#### Known Issues:
- [NEW] Guards move sporadically/unrealistically when suddenly encountering a hostile mob (i.e. a pillager dropped via summon).
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.9 from the previous snapshot release. Updates armor rendering (as done to all previous version) that didn't match the [original version of this repo from mrsterner](https://github.com/mrsterner/GuardVillagers).Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- [NEW] Guards move sporadically/unrealistically when suddenly encountering a hostile mob (i.e. a pillager dropped via summon).
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.8.Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.7.Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.6.Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.5.Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
1.21.4.Updates to shoulder pads:
- no longer show through chest armor
- slightly rotated downward to match original version
Updates to quiver:
- updated quivers to match the slight offset on the back as found in the original version
- no longer intrudes into the head.
- now sit off of chest armor slightly more to prevent armor rendering into the quiver.
- size was slightly reduced.
- only renders if not holding a bow or a crossbow
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
1.21.8 to 1.21.9 on the snapshot 25w37a! This is not a stable release.The only major code change was in the handling of armor rendering.
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.- NOTE**: attached file doesn't match recent change to version naming convention. Snapshot now comes directly after MC version number and is followed by mod version number.
1.21.7 to 1.21.8!#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.6 to 1.21.7!#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.1.21.5 to 1.21.6!#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
_Migrating from <=1.21.5_: you will see warnings in the logs like
Failed to decode value '{}' from field 'ArmorItems' at index 0': No key id in MapLike[{}]. This is due to inventory management changes and is expected. May fix in the future.- Major Bug Fix**: When migrating from Minecraft version
1.21.4to1.21.5for GuardVillagers, existing guards would disappear. This was due to handling of the existence of items in a guards inventory, hand items, and armor items.
- IMPORTANT**: If migrating from
1.21.4, please use this version (mc1.21.5-1.0.3-fabric) or _newer_ for1.21.5. If you usemc1.21.5-1.0.2-fabric, you will lose your existing guard villagers.
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
1.21.5!#### Additional changes include:
- Guard Villager GUI now shows guard model
<img width="174" height="164" alt="2025-08-21_22 09 16" src="https://github.com/user-attachments/assets/21a34449-c863-4cf5-9039-7c145e912f97" /><img width="174" height="164" alt="2025-08-21_22 04 07" src="https://github.com/user-attachments/assets/f1f78218-4011-4d6d-8f5f-2ed69d857466" />
- New spawn egg texture added in parity with
1.21.5spawn egg changes
<img width="120" height="120" alt="guard_spawn_egg" src="https://github.com/user-attachments/assets/1b95f133-620d-4eb6-ad5e-da0527ef2944" />
#### Known Issues:
- MAJOR BUG**: When migrating from Minecraft version 1.21.4 to 1.21.5 for GuardVillagers, existing guards will disappear. This is due to handling of the existence of items in a guards inventory, hand items, and armor items. This is fixed in [mc1.21.5-1.0.3](https://modrinth.com/mod/mcmassok-guardvillagers-fork/version/mc1.21.5-1.0.3-fabric), please use this version for 1.21.5!
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
#### Known Issues:
- [NEW] GUI is missing model when interacting with a Guard Villager (fix planned for 1.21.5).
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.
#### Additional changes include:
- Crossbow guards no longer overshoot their targets
- Bow guards AI fixed (guards can use regular bows again)
- Melee guard pathing behavior updated to prevent "moonwalking" and not attacking
#### Known Issues:
- Bow guards that have an active target have a tendency to take paths that incur fall damage when no other path is available.
- Melee guards with shields can get stuck in a permanent blocking-only loop when 1v1 against a ranged mob.