Back to mods
Accidental Sweep project artwork

Modrinth · Minecraft mod

Accidental Sweep

Prevents you from accidentally attacking the wrong mob when using a sword.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Accidental Sweep release should I use?

Updated yesterday
Latest stable file 1.2.0
Game version 1.21.11
Loader Fabric

Accidental Sweep 1.2.0 targets 1.21.11 with Fabric. Do not install it on the client. It must be installed on the dedicated server. All 3 required mods have matching files.

Where it goes

Is Accidental Sweep required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does Accidental Sweep 1.2.0 need?

1.2.0. Change the file and its required mods may change too.

All 3 required mods have matching files

Install Fzzy Config, Fabric API, Fabric Language Kotlin first. We found matching files for this game-version and loader setup. 2 come through another mod in the chain.

2 listed on this file 2 pulled in by those mods
Mod Menu Optional for Accidental Sweep 1.2.0
optional
No matching file
Fzzy Config Needed by Accidental Sweep 1.2.0
required
Matching file found Matched file: 0.7.6+1.21.11
Fabric API Needed by Fzzy Config
pulled in
Matching file found Matched file: 0.141.6+1.21.11
Fabric Language Kotlin Needed by Fzzy Config
pulled in
Matching file found Matched file: 1.13.13+kotlin.2.4.10

2 extra mods were pulled in by other dependencies. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Accidental Sweep without breaking your instance.

Built for Accidental Sweep 1.2.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.2.0. It targets 1.21.11 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fzzy Config, Fabric API, Fabric Language Kotlin first. We found matching files for this game-version and loader setup. 2 come through another mod in the chain.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.2.0. It opens that exact file at the source.

About this project

What does Accidental Sweep add?

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

player hitting a skeleton with a sword and not hitting the zombified piglins that are around it

playing not beeing able to attack a wolf while they are on ground, and beeing successful when they are jumping


Source code can be found on GitHub

Project description from Modrinth.

Pick your setup

Accidental Sweep by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

3 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Accidental Sweep versions and loaders

4 of 4 releases match

Looking for an older file? The official Modrinth project page is in Resources.