ModsFinder

Protect My Villager

by yfc

Protect My Villager stops players from hitting villagers by accident, using a client-side filter that cancels attack packets aimed at villager entities.

FabricClient-side onlyCreative Commons Attribution 4.01.21 – 1.21.11

What it does

The mod hooks the attack methods in the client and checks the entity type before an attack is sent. When the target is a villager, the attack packet is cancelled before it leaves the game, so a stray click cannot injure or kill the villager. Other entity types can still be attacked as usual.

Because the filter works entirely on the client, it can be added to any Fabric world or server without server-side changes, and players can keep using it on servers that do not run the mod. Settings are exposed through Mod Menu, where a player can adjust the options and toggle the hand swing animation that plays when attacking villagers. An option also lets a sword-type item in hand bypass the cancellation, for players who need to strike a villager on purpose.

Fabric API is required. Mod Menu is optional and only adds the configuration screen. The environment is client-side only, and the mod is released under the Creative Commons Attribution 4.0 license, so it is not open source. Files exist for 12 game versions, 1.21 – 1.21.11, with 1.2.4 for 1.21.11 as the latest Fabric file.

Key features

  1. Villager attack filter

    Attack packets aimed at villagers are cancelled on the client before they are sent, so accidental hits do nothing.

  2. Entity type filtering

    The filter checks the target's entity type, so only villagers are protected and other mobs behave normally.

  3. Mod Menu configuration

    Options can be changed through the Mod Menu screen without editing files by hand.

  4. Hand swing toggle

    The hand swing animation that plays when attacking a villager can be turned off in the settings.

  5. Sword bypass

    Holding a sword-type item can bypass the cancellation, letting a player attack a villager deliberately.

Compatibility

Latest build for each game version and loader.

1.21.x12 of 12 versions with builds
1.21.111.2.4
1.21.101.2.4
1.21.91.2.4
1.21.81.0.7
1.21.71.0.7
1.21.61.0.7
1.21.51.0.7
1.21.41.0.7
1.21.31.0.7
1.21.21.0.7
1.21.11.0.7
1.211.0.7
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Requirements

Dependencies declared by the latest file for each loader.

Required 1

Fabric APILightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.
Required

Optional 1

Mod MenuAdds a mod menu to view the list of mods you have installed.
Optional

Use cases

Who it’s for: Players who often click through crowded villager areas and want a safeguard against accidental attacks, mainly in survival worlds and on multiplayer servers that allow Fabric clients.

Questions

Does Protect My Villager need Fabric API?

Yes. Fabric API is a required dependency and must be installed alongside the mod.

Does the server need Protect My Villager installed?

No. It is installed on the player's side alone, so servers need nothing.

Which game versions does Protect My Villager support?

Files exist for 12 versions, 1.21 – 1.21.11, with 1.2.4 as the latest Fabric file for 1.21.11.

In the catalog

Protect My Villager is one of 11,058 Mobs mods on ModsFinder, and one of 5,189 Mobs mods for Fabric. 19,862 mods support Minecraft 1.21.11.

More from yfc

All projects

Similar mods

Official listing

Owner
yfc
Published
2025-10-10
Updated on Modrinth
2026-05-13
Facts verified
2026-10-15

Tags