Mineuniverse
Log in Register
Mods

Out of Combat

Bring a simple but easily configurable Out-of-Combat mechanic into Minecraft.
by RisingInIris2017
Download Claim this project
13,519 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Adventure and RPG

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.

out_of_combat-1.20.1-1.1.1.jar
MC Client, 1.20.1, Forge, Server
Release 2025-05-10 Get
k4lib-1.12.1-2.1.81-universal.jar
MC 1.12.1, 1.12, 1.12.2
Release 2018-01-02T16:21:19.93Z Get
k4lib-1.12.1-2.1.80-universal.jar
MC 1.12.1
Release 2017-09-30T17:48:13.427Z Get
k4lib-1.12-2.1.77-universal.jar
MC 1.12
Release 2017-07-08T08:58:31.593Z Get
k4lib-1.10.2-1.0.74-universal.jar
MC 1.10.2
Release 2017-04-22T17:20:31.4Z Get
k4lib-1.11.2-2.1.76-universal.jar
MC 1.11.2
Release 2017-04-22T17:19:53.26Z Get
k4lib-1.7.10-0.1.75-universal.jar
MC 1.7.10
Release 2017-04-22T17:19:25.837Z Get
k4lib-1.10.2-1.0.66-universal.jar
MC 1.10.2
Release 2016-10-08T21:06:00.287Z Get
k4lib-1.10.2-1.0.64-universal.jar
MC 1.10.2
Release 2016-10-04T21:55:58.307Z Get
k4lib-1.10.2-1.0.59-universal.jar
MC 1.10.2
Release 2016-10-01T22:31:29.96Z Get
k4lib-1.10-1.0.58-universal.jar
MC 1.10.2, 1.10
Release 2016-06-23T11:41:01.167Z Get
k4lib-1.9.4-1.0.5-universal.jar
MC 1.9.4
Release 2016-05-23T17:56:00.443Z Get
k4lib-1.9-1.0.4-universal.jar
MC 1.9
Release 2016-04-01T19:23:16.343Z Get
k4lib-1.8.9-1.0.18-universal.jar
MC 1.8.9
Release 2016-03-31T17:40:14.367Z Get
k4lib-1.8.9-1.0.16-universal.jar
MC 1.8.9
Release 2016-02-12T00:32:15.127Z Get
k4lib-1.8.9-1.0.14-universal.jar
MC 1.8.9
Release 2016-02-08T23:43:42.013Z Get
k4lib-1.8.9-1.0.12-universal.jar
MC 1.8.9
Release 2016-02-04T18:19:52.117Z Get
k4lib-1.8.9-1.0.11-universal.jar
MC 1.8.9
Release 2016-02-03T11:28:59.157Z Get
k4lib-1.8.9-1.0.10-universal.jar
MC 1.8.9
Release 2016-02-01T14:36:54.773Z Get
k4lib-1.8.9-1.0.8-universal.jar
MC 1.8.9
Release 2016-01-28T16:33:57.097Z Get
k4lib-1.8.9-1.0.7-universal.jar
MC 1.8.9
Release 2016-01-19T17:22:20.053Z Get
k4lib-1.8.8-1.0.5-universal.jar
MC 1.8.8, 1.8.9
Release 2016-01-05T22:15:11.187Z Get
k4lib-1.8.8-1.0.4-universal.jar
MC 1.8.8
Release 2015-12-28T15:25:01.81Z Get
k4lib-1.7.10-0.1.57-universal.jar
MC 1.7.10
Release 2015-12-25T00:09:53.847Z Get
k4lib-1.8.8-1.0.3-universal.jar
MC 1.8.8
Release 2015-12-24T10:57:00.847Z Get
k4lib-1.7.10-0.1.55-universal.jar
MC 1.7.10
Release 2015-10-06T15:43:08.823Z Get
k4lib-1.7.10-0.1.52-universal.jar
MC 1.7.10
Release 2015-08-15T14:26:21.753Z Get
k4lib-1.8-1.0.11-universal.jar
MC 1.8
Release 2015-06-30T17:40:25.293Z Get
k4lib-1.7.10-0.1.50-universal.jar
MC 1.7.10
Release 2015-06-30T15:40:01.763Z Get
k4lib-1.7.10-0.1.46-universal.jar
MC 1.7.10
Release 2015-06-22T18:33:41.847Z Get
k4lib-1.7.10-0.1.35-universal.jar
MC 1.7.10
Release 2015-05-10T15:23:29.86Z Get
k4lib-1.7.10-0.1.33-universal.jar
MC 1.7.10
Release 2015-05-07T21:02:28.89Z Get
k4lib-1.8-1.0.4-universal.jar
MC 1.8
Release 2014-11-26T18:14:57.373Z Get
k4lib-1.7.10-0.1.18-universal.jar
MC 1.7.10
Release 2014-10-15T13:11:41.397Z Get
k4lib-1.7.10-0.1.17-universal.jar
MC 1.7.10
Release 2014-10-12T18:23:15.45Z Get
k4lib-1.7.10-0.1.15-universal.jar
MC 1.7.10
Release 2014-10-09T20:19:55.6Z Get
k4lib-1.7.10-0.1.10-universal.jar
MC 1.7.10
Release 2014-10-06T20:28:58.933Z Get

More from RisingInIris2017

Better Advancements - Blessed Edtion
90,915
Game Opening For You
8,965
Raw Mouse Input - Blessed Edition
87,612
TinkerSlashBlade Patch
823
No Mob Friendly Fire
62,060
Spellbind
543

You Might Also Like

AstikorCarts Redux
Horse powered carts and plows, now for 1.20+!
9,976,693
mxTune
Adds musical instruments that allow you to play music in MML format.
994,306
JoJo No Kimyou Na Bouken: JoJoCraft
This is a jojos Mod Nothing more
99,649
Middle-earth
Join the legendary world of Tolkien's universe from The Lord of The Rings to the Hobbit and more!
99,467
Pure Discs - Tricky Trials (Fabric/Forge)
Adds nine new discs from songs that were added in the 1.21 Tricky Trials update!
99,442
Reverse Eon
Reverse Eon adds a persistent, player-owned island dimension to Minecraft. Enter your personal world through the Timekeeper Suitcase and manage it with the Computer Suitcase, giving you full control over island settings, portals, visitors, and more.
9,980