Community listing page, reviews may not be monitored by the author.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
# Dynasty Guard Fix
**Stops the Guard Villagers crash when a guard fires a bow.**
If your Fabric 1.21.1 server crashes with `java.lang.IllegalArgumentException: Invalid weapon firing an arrow` while ticking a `guardvillagers:guard` entity, this small server-side mod is for you.
## The problem
When a guard fires a bow, Guard Villagers clears the item the guard is using, then passes that same empty item to Minecraft as the arrow's weapon. Minecraft 1.21 rejects arrows fired from an empty weapon. The error happens during the entity tick, so the whole server goes down.
Guards only use swords and crossbows by default, so the bug can stay hidden for a long time. It usually appears once guards receive bows, for example through a datapack, an equipment mod, or a player.
## The fix
Just before an arrow is created, this mod checks the weapon. If it is empty, the item in the shooter's main hand is used instead. If that hand is empty too, the arrow is created with no weapon, which Minecraft accepts.
Valid weapons are never changed, so the mod only acts in a case that would otherwise crash the server. Guards keep their bows and shoot normally.
The fix is applied to Minecraft's arrow creation code rather than to Guard Villagers itself. It should therefore also stop the same crash if another mod makes the same mistake.
## Features
- No more `Invalid weapon firing an arrow` crash
- Guards keep their bows, with no commands or item replacement needed
- Server-side only: players don't need to install anything
- No configuration
- No Fabric API required
- One small mixin
## Installation
1. Put the jar in your server's `mods` folder.
2. Restart the server.
The first time a shot is corrected, the console shows this message once:
`Tir à l'arme vide corrigé (premier cas : ...). Le serveur n'a pas planté.`
## Compatibility
- Minecraft 1.21.1
- Fabric Loader 0.19.3 or newer
- Java 21
- The crash was reported with Guard Villagers 2.1.2-1.21.1
## Known limitation
Bows held by guards don't lose durability. Guard Villagers applies the wear to the same empty item, so this doesn't affect server stability.
## FAQ
**Do players need this mod?**
No. It only runs on the server and is ignored on the client.
**Do I still need to remove bows from my guards?**
No. That's the point of this mod.
**Does this replace Guard Villagers?**
No. Keep Guard Villagers installed. This mod only prevents the crash.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources