SwingThrough
Combat in Minecraft can be frustrating when a single pane of glass or a cluster of leaves blocks your attack. You line up the perfect shot on a creeper, but the game insists you are targeting the transparent block instead of the mob behind it. SwingThrough solves this annoyance with a lightweight, elegant fix that prioritizes living entities over non-solid blocks. Once installed, your crosshair will ignore transparent obstacles and lock onto any attackable creature within range, making PvE and mob farming smoother than ever.
What Is SwingThrough?
SwingThrough is a client-side Minecraft mod that changes how the game selects targets when you aim at a block. Normally, if a transparent block like glass, a fence, or leaves is between you and a mob, the game prioritizes the block. SwingThrough discards that block target and lets you hit the living entity behind it, provided the block has an empty collision shape and the entity is attackable. The mod also removes the block outline while you are aiming at the entity, giving you clear visual feedback that your attack will connect.
The logic is simple but effective. SwingThrough checks four conditions before redirecting your attack:
- The block you are looking at has no collision (it is transparent or non-solid).
- The entity behind it is alive and can be attacked.
- You are not currently riding the entity.
- The entity is within your normal interaction range (the exact reach distance used in Minecraft 1.21).
Because the mod uses a single mixin with just a few lines of code, it is incredibly performance-friendly. There are no extra raycasts or radius searches, so your game runs just as smoothly as before.
Supported Minecraft Versions and Loaders
SwingThrough is available for modern Minecraft versions, including 1.21, 1.20.6, 1.20.4, 1.20.1, and many earlier releases. The mod is primarily built for the Fabric loader, but players on NeoForge can use it seamlessly with the Connector mod, which allows Fabric mods to run on NeoForge. This cross-loader compatibility means you can enjoy SwingThrough regardless of your preferred modding platform. For those who still use Forge, a dedicated Forge version is also available, ensuring that almost every modded setup can benefit from this quality-of-life improvement.
How to Install SwingThrough
Installing SwingThrough is straightforward. First, make sure you have the correct mod loader installed for your Minecraft version. For Fabric, you will need the Fabric API. For NeoForge, you will need the Connector mod alongside SwingThrough. Once your loader is ready, simply place the SwingThrough JAR file into your mods folder. The mod requires no additional configuration; it works immediately after launching the game.
If you prefer a hassle-free setup, the foxygame.net launcher offers a curated add-on catalog where SwingThrough can be installed with a single click. The launcher automatically handles version compatibility and keeps the mod updated, so you never have to worry about mismatched files or manual downloads. It is a convenient way to manage your entire mod collection while ensuring SwingThrough always works with your current Minecraft version.
Why You Need SwingThrough
Anyone who has fought mobs near windows, inside greenhouses, or around leaf blocks knows the struggle. A skeleton shoots you through a gap in the foliage, but you cannot shoot back because the game thinks you are aiming at the leaves. SwingThrough eliminates that unfair disadvantage. It is especially useful in custom adventure maps, skyblock packs, and modded dimensions where transparent barriers are common. Farmers who use glass-walled mob grinders will also appreciate being able to hit mobs without breaking their carefully built enclosures.
Technical Simplicity
Under the hood, SwingThrough is a model of minimalism. The entire mod consists of a single mixin that modifies the entity-targeting method. Two lines of code extend the targeting range to cover the full reach distance when the looked-at block meets the conditions. Two more lines discard the block target if the full range was used and a valid entity is found. There is no bloat, no unnecessary features, and no performance impact. This lean approach means the mod is unlikely to conflict with other mods, making it a safe addition to even the largest modpacks.
Visual Feedback
One subtle but important detail is the block outline. In vanilla Minecraft, the black outline appears on whatever block you are looking at. With SwingThrough, that outline vanishes when you are targeting an entity through a transparent block. This instant visual cue tells you that your sword or bow will hit the mob, not the glass. It removes the guesswork and makes combat feel more responsive.
Compatibility and Modpacks
SwingThrough works alongside popular combat mods, HUD mods, and optimization mods like Sodium and OptiFine. Because it only touches the target selection logic, it does not interfere with rendering or entity behavior. Many modpack creators include SwingThrough as a default quality-of-life addition. If you are building your own modpack, adding SwingThrough is a simple way to improve the player experience without introducing complexity.
For those who enjoy playing on servers, note that SwingThrough is client-side only. You do not need the server to have it installed, and it will not give you an unfair advantage because it only affects your own targeting. It respects the server's reach and attack rules, so you can use it on any server that allows client-side mods.
Download SwingThrough for Minecraft
Ready to stop fighting with glass panes? You can download SwingThrough from popular mod hosting sites. Look for the version that matches your game and loader. The mod is free and open-source, so you can also inspect the code or contribute to its development. Whether you are a casual player tired of missed hits or a modpack author seeking a polished experience, SwingThrough is a tiny mod that makes a huge difference in everyday gameplay.