
Modrinth · Minecraft mod
AntiSwap (Attribute Swap Fix)
Prevents players from using attribute swap exploits by fast-swapping items to their offhand. Highly configurable and perfect for Modpack, PvP and SMP servers!
Quick answer
Which AntiSwap (Attribute Swap Fix) release matches 1.20.6 Forge?
AntiSwap (Attribute Swap Fix) 1.1.0 targets 1.20.1, 1.20.2, 1.20.3 with Forge. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.
Where it goes
Is AntiSwap (Attribute Swap Fix) required on the client, server, or both?
Do not install it on the client. It must be installed on the dedicated server.
This file is marked server-only.
What else does AntiSwap (Attribute Swap Fix) 1.1.0 need?
1.1.0 on 1.20.6 Forge. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add AntiSwap (Attribute Swap Fix) without breaking your instance.
Built for AntiSwap (Attribute Swap Fix) 1.1.0 on 1.20.6 Forge. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.1.0. It targets 1.20.1, 1.20.2, 1.20.3 with Forge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
Do not install it on the client. It must be installed on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.1.0. It opens that exact file at the source.
About this project
What does AntiSwap (Attribute Swap Fix) add?
Overview
Anti-Swap Fix addresses a critical combat exploit where players can swap weapons mid-attack to gain unintended attribute bonuses. This exploit allows players to combine the attack speed of one weapon with the damage or attributes of another, creating an unfair advantage in PvP and PvE scenarios.
This mod was specifically designed for large modpack SMPs where players have access to weapons with unique attributes and special effects. In these environments, the exploit becomes particularly problematic as players can mix and match powerful modded weapon attributes, completely breaking the intended game balance and progression systems.
The Problem
In vanilla Minecraft, when a player initiates an attack, the game calculates damage and applies attributes based on the item held at the moment the attack connects, not when it was initiated. This creates a window of opportunity where players can:
- Start an attack with a fast weapon (e.g., dagger with high attack speed)
- Swap to a powerful weapon mid-attack (e.g., sword with high damage)
- Deal damage with the powerful weapon while maintaining the attack speed of the fast weapon
This exploit is commonly known as "Attribute Swap" or "Weapon Swap" and can severely impact game balance, especially on servers with custom weapons or RPG-style combat systems.
How It Works
Anti-Swap Fix uses a simple but effective approach:
- Snapshot System: At the start of each player tick, the mod records which item the player is holding
- Attack Validation: When a player attempts to attack, the mod compares the current held item with the snapshot
- Exploit Prevention: If the items don't match, the attack is cancelled
This "snapshot-and-validate" strategy ensures that players can only deal damage with the weapon they were actually holding when they initiated the attack.
Features
- Server-Side Only: No client installation required
- Lightweight: Minimal performance impact with efficient snapshot caching
- Configurable: Enable/disable protection via server config or commands
- Debug Mode: Optional per-player debug messages for testing and verification
- Zero False Positives: Only cancels attacks when an actual swap is detected
Configuration
The mod creates a configuration file at config/antiswapfix-server.toml with the following options:
[General Settings]
# Enables protection against the Attribute Swap exploit
enabled = true
# Sends debug messages to players when attacks are cancelled
debugMode = false
Commands
All commands require operator permission (level 2).
Toggle Protection
/antiswap toggle true/false
Enables or disables the anti-swap protection.
Toggle Debug Mode
/antiswap debug true/false
Enables or disables debug messages for the player who executes the command. When enabled, you will receive detailed messages showing which items were swapped when an attack is cancelled.
Debug messages show:
- The item held at the start of the tick
- The item held when the attack was attempted
- Color-coded information for easy identification
Compatibility
- Minecraft Version: 1.20.1
- Mod Loader: Forge 47.4.10+
- Side: Server-side (client installation optional but not required)
Why This Mod?
In large modpack environments, the Attribute Swap exploit becomes exponentially more dangerous. Players can exploit combinations of:
- High attack speed weapons from one mod with high damage weapons from another
- Weapons with special effects combined with weapons that have high base damage
- Enchantments and custom attributes that were never meant to work together A player with a fast dagger and a powerful greatsword can effectively have both at once, trivializing boss fights and making PvP completely unbalanced. Anti-Swap Fix provides a clean, universal solution that works with any item, any mod, and any combat system. It doesn't care about attributes, enchantments, or special effects - it simply ensures you attack with the weapon you're actually holding.
Credits
Author: SatDPhoe
Project description from Modrinth.
Pick your setup
AntiSwap (Attribute Swap Fix) by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.20.5
1 loader build1.20.4
1 loader build1.20.3
1 loader build1.20.2
1 loader build1.20.1
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
AntiSwap (Attribute Swap Fix) versions and loaders
1.1.0
antiswapfix-1.1.0.jar
7 May 2026
Looking for an older file? The official Modrinth project page is in Resources.