Protect My Villager
Introduction
Adds a protection & filtering feature that prevents you from accidentally attacking villagers.
If you've ever hit a villager by your mistake and ended up with higher trade prices, this mod will solve that problem.
Features
- Toggle protection via toggle keybinding (Default: M)
- Supports mod menu configuration to customize options
- Toggle hand swing animation when attacking villagers (packet included)
- Bypass attack cancellation if the hand item is sword-type
FAQ
-
Why should I use it?
- It is lightweight and user-friendly. You can customize extensive filters via the mod menu and toggle features instantly using keybinds.
-
How does it work?
- It hooks attack methods to filter specific entity types and cancels attack packets before they are sent.
-
Where can it be used?
- Since it operates entirely on the client-side, you can use it anytime and on any server.
-
Does it affect the server?
- No. It has no impact on server-side logic or your game performance.
Dependencies
- No. It has no impact on server-side logic or your game performance.
-
Mod Menu (Optional, used for configuration)
Updates & Screenshots
How to Install Protect My Villager (Mod)
Protect My Villager by yfc is verified for Fabric across Minecraft versions 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5 (latest release: 1.2.4, file size: 29 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5) and platform (Fabric).
- Make sure you have the compatible loader or environment installed for Fabric.
- Move the downloaded Protect My Villager file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version## Updates
- Changed mod config screen
## Updates
- Changed mod config screen
- Removed unused logic
## Updates
- Changed author
- Removed hardcoded mod id
## Updates
- Fixed minor issues
- Simplified code structure through refactoring
## Updates
- Added new option that bypasses attack cancellation when a holding sword
- Changed mod author (kop -> GreyMusic)
- Changed Y position of option buttons in config screen
- Removed unused & complicated logic
## Updates
- Updated to be compatible with 1.21.11
- Fixed all crashes in mod container init logic (sorry for the late update)
- Added some more language support in lang directory
## Updates
- Version compatible with 1.21.9 ~ 1.21.10
## Updates
- Simplified conditional logic in mixins
- Removed duplicated code
- Optimized some simple logics
## Updates
- Version compatible with 1.21.9 ~ 1.21.10
## Updates
- Fixed minor issues in removing swing hand logic
- Added some logging utils in client initialization.
- Removed useless logic in source code
## Updates
- Version compatible with 1.21.9 ~ 1.21.10
## Updates
- Changed the ON/OFF text colors in the configuration screen
- Fixed a minor issue in the mod info logging logic
- Added an option to cancel the hand swing packet
- Aligned the option button widgets vertically
## Updates
- Version compatible with 1.21.9 ~ 1.21.10