Out of Combat
Minecraft’s combat system has evolved over the years, but one thing remains constant: the need for precise control over when a player is considered “in combat.” The Out of Combat mod introduces a simple yet powerful mechanic that tracks attack and damage timers, giving modpack creators and server admins a new layer of gameplay customization. Whether you want to delay health regeneration, restrict teleportation, or trigger special abilities only when a player is safe, this mod provides the foundation.
What Is the Out of Combat Mod?
At its core, Out of Combat is a lightweight Forge mod that adds a configurable out-of-combat detection system. It monitors two independent timers: one that resets when the player attacks, and another that resets when the player takes damage. Once both timers have expired without any hostile action, a third timer begins counting up. When that third timer reaches a defined threshold, the player is officially marked as out of combat. This status is stored as an NBT tag, making it accessible to other mods, scripts, or command blocks.
How the Combat Timer Logic Works
The mod’s logic is refreshingly straightforward. Three variables — T1, T2, and T3 — control the entire system. T1 is the number of game ticks since the player last attacked. T2 is the ticks since the player last took damage. If both T1 and T2 exceed their configured minimums, an out-of-combat timer starts ticking. Once that timer reaches T3, the player is considered out of combat. Attacking or being damaged instantly clears the respective timer and resets the out-of-combat progress. Additionally, a special countdown timer can pause the out-of-combat timer without resetting it, perfect for temporary invulnerability effects or ability durations.
Supported Minecraft Versions and Loader
This mod is built for Forge and supports a wide range of Minecraft versions, making it a versatile choice for both legacy and modern modpacks. You can use Out of Combat on Minecraft 1.12.2, 1.16.1 through 1.16.5, 1.18 to 1.18.2, 1.20.1, and 1.20.6. The developer has ensured that the core mechanic remains consistent across these versions, with configuration files adapted to each version’s standards — from the older .cfg format in 1.12.2 to the modern .toml files in 1.16+.
Configuration and Customization
Out of the box, the mod’s default timer values are intentionally set high, meaning it won’t affect gameplay until you tweak the config. This design choice puts you in full control. The configuration file is well-documented with comments explaining each variable. For 1.12.2, you’ll find it at config/out_of_combat.cfg; for 1.16.x and above, look for config/out_of_combat-common.toml. You can adjust the attack cooldown, damage cooldown, and the out-of-combat threshold to fit your modpack’s pace. For example, a fast-paced PvP server might want short timers, while a survival RPG could benefit from longer delays before considering a player safe.
NBT Tags for Advanced Integration
One of the mod’s standout features is its use of persistent NBT tags. All timer data is stored directly on the player entity under ForgeData/PlayerPersisted/out_of_combat. This includes four tags: noAttackingTime, noAttackedTime, stopOutOfCombatTimer, and outOfCombatTime. Because these are standard NBT tags, you can read or modify them with CraftTweaker, KubeJS, command blocks, or other mods without needing a special API. This makes Out of Combat an incredibly flexible tool for modpack developers who want to create custom mechanics around combat states.
How to Install Out of Combat
Installing the mod is straightforward. First, ensure you have the correct version of Forge installed for your Minecraft version. Then, download Out of Combat from a trusted mod repository like CurseForge or Modrinth. Place the downloaded .jar file into your Minecraft mods folder. Launch the game using the Forge profile, and the mod will be active. If you’re using a custom launcher, the process is similar. For instance, the foxygame.net launcher streamlines this by offering a one-click install for Out of Combat directly from its add-on catalog, automatically handling version compatibility and updates so you can focus on configuring the mod to your liking.
Practical Uses in Modpacks
The out-of-combat state is a powerful trigger for countless gameplay mechanics. Here are a few ideas:
- Regeneration Control: Only allow health regeneration when the player is out of combat, creating a more strategic survival experience.
- Teleportation Restrictions: Prevent players from using teleport commands or items while in combat, adding risk to exploration.
- Ability Cooldowns: Use the countdown timer to pause out-of-combat detection while a temporary invulnerability shield is active, ensuring abilities don’t unfairly reset combat status.
- Stealth Mechanics: Trigger stealth or invisibility effects only when the player has been out of combat for a set time.
Because the mod exposes its timers via NBT, you can integrate it seamlessly with quest mods, custom GUIs, or even vanilla command block contraptions. The countdown timer is especially clever — it doesn’t clear the out-of-combat progress, so a player who uses a short defensive ability can still be considered “in combat” until they truly disengage.
Why Choose Out of Combat?
Unlike other combat-related mods that overhaul the entire system, Out of Combat does one thing and does it well. It’s lightweight, highly configurable, and doesn’t force any gameplay changes on its own. This makes it an ideal building block for modpack creators who want to add depth without bloat. The mod’s simple logic also means it’s unlikely to conflict with other mods, and its NBT-based approach ensures maximum compatibility. Whether you’re building a hardcore survival pack, a magic-themed RPG, or a competitive PvP arena, this mod gives you the tools to define what “out of combat” really means.
Conclusion
The Out of Combat for Minecraft mod fills a niche that many players didn’t realize they needed. By adding a clear, configurable combat state, it opens the door to creative mechanics that enhance immersion and challenge. With support for versions from 1.12.2 to 1.20.6 and a straightforward installation process, it’s accessible to a wide audience. Download Out of Combat today and start experimenting with custom combat logic — your modpack will thank you.