Held Shield DR 为盾牌类物品添加了被动伤害减免,灵感来源于出色的 Passive Shield 模组。模组化的盾牌开箱即用,无需额外配置!
默认情况下,玩家只需手持盾牌即可获得伤害减免。你也可以将该行为扩展至特定的非玩家实体,为某些实体设置自定义数值,或者在整合包需要时为其他生物启用备用设置。
该模组还支持针对物品的覆盖设置,因此单个盾牌可以使用自己的伤害减免值,而不是共享的常规设置。这使得调整模组化盾牌变得简单,而无需更改整个系统。
盾牌检测功能灵活多样。它支持常规的盾牌检测、常见的盾牌物品行为,以及可选的工具提示支持(客户端也需要此功能才能显示),以便玩家了解盾牌的具体配置效果。
1.1.2 版新增:盾牌现在可以在被动伤害减免生效时选择性地消耗耐久度,并支持可配置的倍率和上限选项。
示例配置
剧透
此示例同时执行了多项操作:
- 玩家获得 33% 的被动盾牌伤害减免。
- 允许玩家使用针对物品的盾牌覆盖设置。
- Touhou Little Maid 的女仆被允许使用被动盾牌伤害减免。
- 它们使用自定义的 65% 数值,而非默认的共享 33%。
- 注意:此处使用的实体 ID 来自 Touhou Little Maid 的 1.12.2 版本。其他版本可能使用不同的 ID,例如 1.20.1 版本使用的是
touhou_little_maid:maid 而不是 touhou_little_maid:entity.passive.maid。请务必检查你所用版本的实际实体 ID。
- 不在白名单中的非玩家实体默认不使用被动盾牌伤害减免。
- 如果启用了
applyToAllEntities,这些实体将使用其独立的 33% 备用数值。
- 特定的盾牌物品可以使用其自定义的伤害减免值。
- 启用了盾牌工具提示。
- 禁用了额外的物品覆盖后缀文本。
general {
B:enabled=true
B:applyToPlayers=true
B:playersUseItemOverrides=true
D:damageReductionPercent=33.0
B:applyToAllEntities=false
D:allEntitiesDamageReductionPercent=33.0
# 如果你希望某个实体使用上方普通的共享 damageReductionPercent 值,请使用 entityWhitelist。
S:entityWhitelist <
touhou_little_maid:entity.passive.maid
>
# 如果你希望某个实体使用其自定义的数值,请使用 entityDamageReductionOverrides。
# 如果一个实体列在此处,则不需要同时列入 entityWhitelist。
# 覆盖设置的优先级高于共享白名单的值。
S:entityDamageReductionOverrides <
touhou_little_maid:entity.passive.maid;65.0
>
# 如果为 true,符合条件的非玩家实体也可以使用 itemDamageReductionOverrides。
# 拥有独立实体级覆盖设置的实体会忽略物品覆盖设置。
# 使用 entityWhitelist 或 applyToAllEntities 的实体会采用其正常伤害减免与物品覆盖设置中较高的那个值。
B:entitiesUseItemOverrides=false
S:itemDamageReductionOverrides <
basemetals:diamond_shield;90.0
>
B:showShieldTooltips=true
B:showItemOverrideText=false
}
Held Shield DR adds passive damage reduction to shield type items inspired by the wonderful Passive Shield mod. Modded shields are supported out of the box, no extra configuration needed!
By default, players can gain damage reduction just by holding a shield. You can also extend that behavior to specific non-player entities, give certain entities their own custom values, or enable a fallback setting for other living entities if your pack needs it.
The mod also supports item specific overrides, so individual shields can use their own damage reduction values instead of the normal shared settings. That makes it easy to tune modded shields without changing the whole system.
Shield detection is flexible. It supports normal shield checks, common shield item behavior, and optional tooltip support (client needs it as well for it to show) so players can see what a shield is configured to do.
New in 1.1.2: shields can now optionally drain durability when passive DR is active, with configurable multiplier and cap options.
Example config
Spoiler
This example does a few different things at once:
- Players get 33% passive shield damage reduction.
- Players are allowed to use item specific shield overrides.
- Touhou Little Maid maids are allowed to use passive shield DR.
- They use a custom 65% value instead of the normal shared 33%.
- Note: the entity IDs used here are from the 1.12.2 version of Touhou Little Maid. Other versions may use different IDs, for example 1.20.1 uses touhou_little_maid:maid instead of touhou_little_maid:entity.passive.maid. Always check the actual entity ID for your version.
- Non-player entities not in the whitelist do not use passive shield DR by default.
- If applyToAllEntities were enabled, those entities would use their own separate 33% fallback value.
- A specific shield item can use its own custom DR.
- Shield tooltips are enabled.
- The extra item override suffix text is disabled.
general {
B:enabled=true
B:applyToPlayers=true
B:playersUseItemOverrides=true
D:damageReductionPercent=33.0
B:applyToAllEntities=false
D:allEntitiesDamageReductionPercent=33.0
# Use entityWhitelist if you want an entity to use the normal shared damageReductionPercent value above.
S:entityWhitelist <
touhou_little_maid:entity.passive.maid
>
# Use entityDamageReductionOverrides if you want an entity to use its own custom value instead.
# If an entity is listed here, it does not need to also be in entityWhitelist.
# Overrides take priority over the shared whitelist value.
S:entityDamageReductionOverrides <
touhou_little_maid:entity.passive.maid;65.0
>
# If true, eligible non-player entities can also use itemDamageReductionOverrides.
# Entities with their own per-entity override ignore item overrides.
# Entities using entityWhitelist or applyToAllEntities keep the higher of their normal DR or the item override.
B:entitiesUseItemOverrides=false
S:itemDamageReductionOverrides <
basemetals:diamond_shield;90.0
>
B:showShieldTooltips=true
B:showItemOverrideText=false
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧