整合包开发者可能希望限制远程伤害,以鼓励近战并防止“狙击”玩法。本模组提供可配置的解决方案来限制远程伤害上限,其支持范围不仅限于投射物攻击。
通过配置文件(config/RangedDamageLimit-Rules.json),你可以为特定实体启用远程伤害保护,这会将受到的伤害限制在特定值,或者当攻击发生在设定距离之外时完全抵消该攻击。
{
"mobId": 实体注册表 ID(例如 'minecraft:pig'、'twilightforest:kobold')。
"protectionDistance": 触发远程伤害保护机制所需的最小距离(以方块为单位)。
"damageCap": 当攻击源自 protectionDistance 之外时允许的最大伤害。
"noAggroBeyondCertainDistance": [布尔值] 是否在指定距离外完全抵消攻击并阻止仇恨生成。
"noAggroDistance": 攻击抵消的距离阈值(启用时必须 ≥ protectionDistance)。
}
你可以添加多个实体并为它们应用不同的设置,例如:
[
{
"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
}
]
此外,还可以为长距离攻击配置基于距离的伤害衰减(线性衰减)(在 config/RangedDamageLimit-Falloff.json 中)。
例如,如果你将衰减值设置为 0.5,则每过一个方块,伤害就会损失其原始值的 50%,这意味着在超过 2 个方块后伤害将降为零。如果将衰减值设置为 0.0,则不会发生远程伤害衰减。
Modpack developers may want ranged damage restrictions to encourage close-quarters combat and prevent "sniping" gameplay. This mod provides configurable solutions to cap ranged damage, with support extending beyond projectile attacks.
Through the configuration file (config/RangedDamageLimit-Rules.json), you can enable ranged damage protection for specific mobs, which either caps the damage received at a specific value or completely nullifies attacks when they occur beyond a set distance.
{
"mobId": Entity registry ID (e.g. 'minecraft:pig', 'twilightforest:kobold').
"protectionDistance": Minimum distance (in blocks) required to trigger ranged damage protection mechanics.
"damageCap": Maximum damage allowed when attack originates beyond protectionDistance.
"noAggroBeyondCertainDistance": [Boolean] Whether to completely nullify attacks and prevent aggro beyond specified distance.
"noAggroDistance": Distance threshold for attack nullification (must be ≥ protectionDistance when enabled).
}
You can add several mobs and apply different settings for them, like:
[
{
"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, damage falloff (it's linear) can be configured (in config/RangedDamageLimit-Falloff.json) for long-range attacks based on distance.
For instance, if you set the falloff to 0.5, the damage will lose 50% of its original value per block, which means the damage would be reduced to zero beyond 2 blocks. And if you set the falloff to 0.0, there will be no ranged damage falloff.
评论 0
登录后参与评分
还没有评论,来抢沙发吧