Back to mods
Out of Combat project artwork

CurseForge · Minecraft mod

Out of Combat

Bring a simple but easily configurable Out-of-Combat mechanic into Minecraft.

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

Quick answer

Which Out of Combat release should I use?

Updated 1 year ago
Latest stable file out_of_combat-1.20.1-1.1.1.jar
Game version 1.20.1
Loader Forge

Out of Combat out_of_combat-1.20.1-1.1.1.jar targets 1.20.1 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is Out of Combat required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

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

The source does not explicitly classify this release as client-only or server-only.

What else does Out of Combat out_of_combat-1.20.1-1.1.1.jar need?

out_of_combat-1.20.1-1.1.1.jar. Change the file and its required mods may change too.

No extra mods listed for this file

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 Out of Combat without breaking your instance.

Built for Out of Combat out_of_combat-1.20.1-1.1.1.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use out_of_combat-1.20.1-1.1.1.jar. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 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.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside out_of_combat-1.20.1-1.1.1.jar. It opens that exact file at the source.

About this project

What does Out of Combat add?

Out of Combat


Overview

Out of Combat mod.

Support nearly ALL major versions, namely, 1.12.2, 1.16.1-1.16.5, 1.18-1.18.2, 1.20.1, 1.20.6.

As what its name represents, it brings a simple but easily configurable Out-of-Combat mechanic into Minecraft.

Simple means its logic and mechanic are both simple:

(T1, T2, T3 are independent variables, representing number of Minecraft game ticks)

  1. Detect if player has not attacked for a given time T1 / been damaged for a given time T2.

  2. If player has neither attacked for T1 nor been damaged for T2, start to count the out-of-combat time.

    If player attacks / is damaged, clear the corresponding timer and the out-of-combat timer.

  3. If out-of-combat time exceeded T3, player is out of combat.

3 NBT tags updated by events serve as timers, to fulfill the logic above.

Besides, an additional countdown timer will pause the ticking of the out-of-combat timer, but not clear it. It can be used in other combat mechanics.

For example, assuming player can get "Invulnerable"-like abilities in your modpack. when those abilities are activated, they may still in combat, but will not be damaged. If you would like to do so, you may let this countdown timer countdown for the time equals to the abilities' durations. So that the out-of-combat timer will wait for the abilities to deactivate, and continues after that.

Documents for Usage

Config File

1.12.2 version: config/out_of_combat.cfg (GitHub)

1.16.x version: config/out_of_combat-common.toml (GitHub)

1.18+ version: config/out_of_combat-common.toml (GitHub)

It is well documented in its comments.

Default values are large, means this mod are not effective until you modify this config file.

NBT Names and Structure

These 4 NBT tags are saved in player's persisted data: ForgeData/PlayerPersisted, with the structure below.

ForgeData: {
    PlayerPersisted: {
        out_of_combat: {
            noAttackingTime: 0L         // No Attacking Timer
            noAttackedTime: 0L          // Not Being Damaged Timer
            stopOutOfCombatTimer: 0L    // Countdown. Before This is count to 0, Out-of-Combat timer will not tick.
            outOfCombatTime: 0L         // Out of Combat Timer
        }
    }
}

That means, you can easily manipulate the value of each of them with your mods or CraftTweaker/KubeJS scripts or any other scripts like them.

No need for complex APIs or special integrations/compatibilities.


Future Plans

Support other Minecraft versions.

Project description from CurseForge.

Pick your setup

Out of Combat by Minecraft version and loader

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

11 available setups

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

Recent files

Out of Combat versions and loaders

7 of 7 releases match

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