Перейти к содержимому
Mineforgian

In Combat

Detect when the player is in combat and prevent actions! Highly configurable & with mod integrations!

Загрузки
399
Подписчики
11
Обновлён
4 августа 2026 г.
Лицензия
MIT

Опубликован 13 августа 2025 г.

In Combat

banner image discord_link_badge Static Badge

Static Badge Static Badge

Show 1.20.1 Description

Installation

Requires

Features ✨

Becoming "In Combat"

There are a few ways the player can become in combat

  • Receiving damage
  • Dealing damage
  • Having a specific status effect

When "In Combat"

The player will have HUD element indicating that they are in combat.

When the player is in combat the following rules may apply.

  • Death on disconnect
  • Disable natural regeneration (disabled by default)
  • Disable block breaking/placing (disabled by default)

Configuration ⚙️

Basically everything is configurable inside the mod.

General
  • "In Combat" duration (default = 300 ticks -> 15 seconds)
  • Player should die on disconnect (default = true)
  • Disable natural regeneration (default = false)
  • Disable block breaking (default = false)
  • Block breaking whitelist
  • Disable block placing (default = false)
  • Block placing whitelist
  • Always "In Combat" (default = false)
  • Can become "In Combat" while in creative (default = false)
  • Which damage sources should set the player "In Combat"
    • All (default = false)
    • Player (default = true)
    • Any Entity (default = true)
    • Fire (default = true)
    • Fall Damage (default = false)
    • Dragon Breath (default = true)
  • If effects should set the player "In Combat" (default = true)
  • A list of all the effects that set the player "In Combat"
  • Additional effects that the player gets when "In Combat"
  • Attacking sets the player "In Combat"
  • Attacked entities that do not set the player "In Combat"
HUD Renderer
  • Should the HUD render (default = true)
  • X Offset (default = 0)
  • Y Offset (default = 0)
Mod Integrations
  • A config option to enable/disable each mod integration

Mod Integrations

Waystones

  • Prevents teleporting while in combat

Spell Engine

  • Spells are cost free to cast while out of combat

Suggest integrations in the Discord!

Technical Info

Anyone can check if the player is in combat using the in combat API. Add this project to your mod with the Modrinth Maven. Once added checks can be done like following

if(CombatCheck.isPlayerInCombat(PlayerEntity)){
  //Your code goes here...
}

Installation ⚙️

Requires

Features ✨

The Effects

  • There are 2 effects Combat and Grace
  • Combat is the main effect applied when the player is in combat
  • Grace is an effect for modpack and mod developers to be used for creating safe areas

Becoming In Combat

  • Receiving damage
  • Dealing damage

When In Combat

  • A HUD element to indicate that you are in combat (see gallery)
  • The following restrictions can be enabled/disabled in the config
    • Death on disconnect
    • Disable natural health regeneration
    • Disable block breaking/placing

Configuration ⚙️

There are many config options allowing for full customization.

Server Config
  • Combat Settings
  • In Combat duration
  • Should attacking entities put the player In Combat (with a blacklist)
  • sdfsdf
  • The damage sources that will put the player In Combat
    • All damage sources
    • Players
    • Entities
    • Fire damage
    • Fall damage
  • The restrictions while in combat
    • Disable block breaking (with a whitelist)
    • Disable block placing (with a whitelist)
    • Kill the player on disconnect
    • Prevent natural health regeneration
  • Grace Settings
  • The restrictions while having grace
    • Disable block breaking (with a whitelist)
    • Disable block placing (with a whitelist)
    • Kill the player on disconnect
    • Prevent natural health regeneration
  • Heal while having grace
  • Healing amount per tick while having grace
Client Config
  • Configurable for both Combat and Grace
  • Should the HUD be rendered
  • HUD icon x-offset
  • HUD icon y-offset

In Combat API

There is an extensive API that allows mod developers to use many of the features of this mod.

Ченджлог

2.0.0+1.21.1Бета1.21.1 · 4 августа 2026 г.

V2.0.0

The first 1.21.1 beta release!

1.20.1 has been abandoned.

IMPORTANT: In Combat now uses Cloth Config API!

New Features

  • The Grace Effect!
    • Allows modpack and mod developers to indicate safe areas!
    • Apply through commands or through the improved In Compat API!

Reworked Config

  • The config has been significantly improved and now splits client and server resources.
  • Note: Mod Menu integration will be added in the future!

A Complete Rewrite

  • The mod has been completely rewritten from the ground up, which allows me to add new features more easily.
  • The In Combat API has been completely rewritten, having more features and java documentation.

Fixes

  • I fixed the networking issues allowing the mod to correctly run on servers and multiplayer.

Mod Compatibility

  • Currently there is no mod compatibility this will be added back in future updates, so stay tuned!

Report Issues and Join the Discord

  • This is a beta release this means issues are expected, please report any issues at either the Discord or Github page!
1.0.4Релиз1.20.1 · 3 февраля 2026 г.

V1.0.4

Added

Changed

Fixed

  • Fixed an issue where food would always deplete rapidly (hopefully)

V1.0.3

Added

  • Blacklist for entities that you attack that do not cause you to be in combat
  • Config option to add additional effects when the player becomes in combat

Changed

  • BREAKING: Effects that cause the player to be in combat now only support registry names

Fixed

V1.0.2

Added

  • Option to become In Combat when dealing damage
  • Whitelist for block breaking and placing
    • Comes with default BOMD compat
  • Spell Engine optional compat
    • Spells only cost runes to cast while In Combat

Changed

Fixed

  • When block placing feature was enabled, some items being unusable while in combat

V1.0.1

Added

  • Config for option for die on disconnect
  • Block breaking & placing disabling while in combat (disabled by default)

Changed

  • Made config screen more logically sectioned

Fixed

V1.0.0

  • Initial release
1.0.3Релиз1.20.1 · 26 ноября 2025 г.

V1.0.3

Added

  • Blacklist for entities that you attack that do not cause you to be in combat
  • Config option to add additional effects when the player becomes in combat

Changed

  • BREAKING: Effects that cause the player to be in combat now only support registry names

Fixed

V1.0.2

Added

  • Option to become In Combat when dealing damage
  • Whitelist for block breaking and placing
    • Comes with default BOMD compat
  • Spell Engine optional compat
    • Spells only cost runes to cast while In Combat

Changed

Fixed

  • When block placing feature was enabled, some items being unusable while in combat

V1.0.1

Added

  • Config for option for die on disconnect
  • Block breaking & placing disabling while in combat (disabled by default)

Changed

  • Made config screen more logically sectioned

Fixed

V1.0.0

  • Initial release
1.0.2Релиз1.20.1 · 23 ноября 2025 г.

V1.0.2

Added

  • Option to become In Combat when dealing damage
  • Whitelist for block breaking and placing
    • Comes with default BOMD compat
  • Spell Engine optional compat
    • Spells only cost runes to cast while In Combat

Changed

Fixed

  • When block placing feature was enabled, some items being unusable while in combat

V1.0.1

Added

  • Config for option for die on disconnect
  • Block breaking & placing disabling while in combat (disabled by default)

Changed

  • Made config screen more logically sectioned

Fixed

V1.0.0

  • Initial release
1.0.1Релиз1.20.1 · 14 сентября 2025 г.

V1.0.1

Fixed

Added

  • Config for option for die on disconnect
  • Block breaking & placing disabling while in combat (disabled by default)

Changed

  • Made config screen more logically sectioned

V1.0.0

  • Initial release
1.0.0Релиз1.20.1 · 16 августа 2025 г.

V1.0.0

  • Initial release

Комментарии

Загружаем…