promotional bannermobile promotional banner

Ranged Damage Limit

Enable ranged damage protection for specific mobs. Ranged damage falloff can also be enabled. Highly Configurable!

File Details

RangedDamageLimit-Forge-1.20.1-1.1.0-beta.jar

  • B
  • Nov 2, 2025
  • 13.17 KB
  • 341
  • 1.20.1
  • Forge

File Name

RangedDamageLimit-Forge-1.20.1-1.1.0-beta.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:ranged-damage-limit-1211714:7176729")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

RangedDamageLimit -Changelog (Beta)

Thanks to Vlad Dumitru for the reminder.

Changes

  • 微调伤害源距离计算逻辑 Adjust Distance Calculation Logic
    调整了伤害源的主人与目标之间的距离计算方式,以处理嵌套伤害源的情况(如投射物拥有者与 DamageSource 的 owner 同时存在时,取最近的距离)。
    Refined the distance calculation between damage source and target to better handle nested sources (e.g., when both projectile owner and DamageSource owner exist, the closer distance is used).

  • 负数距离检测 Detection for Negative Distances
    加入了对负数或无法计算的距离检测,避免开方或其他计算时报错。
    Added detection for negative or uncomputable distances to prevent errors in calculations (e.g., square root of negative numbers).

  • 实体黑名单支持 Entity Blacklist
    新增实体黑名单功能:写在 RangedDamageLimit-BlacklistNoFalloff.json 文件中的实体造成的伤害将不会受到远程衰减。
    比如,你可以尝试加入 minecraft:player 来让玩家造成的伤害不受衰减。
    Added entity blacklist: damage caused by entities listed in RangedDamageLimit-BlacklistNoFalloff.json will ignore ranged falloff.For exmaple, You can try adding minecraft:player to prevent falloff from affecting player damage.

  • Level 检测 Level Check
    现在只有与目标在同一个 Level 并且已加入世界的实体才会用于远程衰减计算,避免未加入世界的实体影响结果。
    Added Level check: only entities in the same Level as the target and added to the world are considered for ranged falloff calculations, preventing unspawned entities from affecting results.

  • 假玩家检测 FakePlayer Handling
    如果是假玩家,则取较小值。 If source.getEntity() is a FakePlayer, use the directEntity’s distance instead.