Download Ranged Damage Limit — Minecraft Mods — MetaMods

Ranged Damage Limit

Active

Downloads

0

Last update

7 months ago
Client
Adventure
Utils

Ranged Damage Limit

Modpack developers often need to limit ranged damage to encourage close-quarters combat and prevent overly effective sniping tactics. This mod provides a flexible restriction system that extends beyond standard projectiles to other types of long-range attacks.

Configuration is handled through the config file (config/RangedDamageLimit-Rules.json), where you can set ranged damage protection rules for specific mobs. The system allows you to either limit received damage to a specific value or completely block attacks made from beyond an established distance limit.

{
    "mobId": "Mob identifier (e.g., 'minecraft:pig', 'twilightforest:kobold')",
    "protectionDistance": "Minimum distance (in blocks) to activate ranged damage protection",
    "damageCap": "Maximum allowed damage when attacking from beyond protectionDistance",
    "noAggroBeyondCertainDistance": "[Boolean] Completely block attacks and prevent aggression at long distance",
    "noAggroDistance": "Distance threshold for attack blocking (must be ≥ protectionDistance when enabled)"
}

You can add multiple mobs with different settings, such as:

[
  {
    "mobId": "minecraft:pig",
    "protectionDistance": 20.0,
    "damageCap": 2.0,
    "noAggroBeyondCertainDistance": false,
    "noAggroDistance": 25.0
  },
  {
    "mobId": "minecraft:zombie",
    "protectionDistance": 40.0,
    "damageCap": 2.0,
    "noAggroBeyondCertainDistance": true,
    "noAggroDistance": 64.0
  }
]

Additionally, you can configure gradual damage reduction (linear nature) based on distance through the config/RangedDamageLimit-Falloff.json file. For example, with a falloff value of 0.5, damage loses 50% of its original value per block, completely disappearing at distances beyond 2 blocks. A value of 0.0 disables the ranged damage falloff system.

Project members
hakujoucho

hakujoucho

Created: 2 Mar 2025

ID: 94879