Overview
Accidental Sweep works by adding new check in the Sweeping Attack (and normal attack if the target is a Pet Mob) for every mob being attacked, and preventing the attack from happening if the mob matches this check.
It has three different lists based of the Minecraft Wiki.
Neutral Mobs are immune to Sweep Attacks, unless the main target is the type as that mob. Attacking it does a normal Sweep Attack that can hit mobs of the same type as it and mobs outside the lists.
Passive Mobs works in a similar way to Neutral Mobs, the only difference is that hitting does damage to the mob itself and mobs outside the lists, it does not attack other mobs of the same type.
Pet Mobs can only be attacked if the player is sneaking or hitting a Critical Attack, attacking these mobs will only attack the main target.
The full lists of mobs is available on GitHub.
Features
Weapons with a Sweep Attack will not attack neutral/passive/pet mobs when you are attacking a different mob
Allows you to bypass the prevention when you are sneaking, hitting a Critical Attack or when the mob is attacking you (Can be disabled in settings)
Allows you to add or remove mobs to the mob lists
The mod is client-sided and should not need to be installed on server
Control the mod with Mod Menu
Allows you to turn On/Off the mod
Brazilian Portuguese translations
FAQ
Can i use this on my modpack/server?
- As long as you don't claim it as your own, i don't see a problem in using it.
Why can't i attack some mobs?
- That mob is probably inside Pet Mobs, to attack those mobs you will need to either hit a Critical Attack on them or be sneaking while attacking. Make sure that the "Bypass prevention" options are turned on. If you are still can't attack these mobs, please open a issue here.
Is this AI generated?
- No, i will never use any type of AI in any of my projects. All of the problems with this are purely blamed by human stupidity.
Will you port this mod to X version?
- Currently i only have plans to port it down to 1.20.1 (and possibly 1.19.2), but every version after 1.21 will probably be ported to. Porting the mod is still in my TODO list, it will be done some time in the future.
Forge/Neoforge version?
- If someone wants to port it themself there will be, but there is no plans for it.
Does this work with Quilt?
- Possibly, it was not tested tho.
Showcase


Source code can be found on GitHub
