ReHurtTime 以轻量且兼容原版的方式重做了 Minecraft 的伤害无敌机制。
默认情况下,大多数伤害来源会绕过标准的无敌时间,使实体能够更稳定地受到伤害。对于被绕过的伤害,击退效果默认被禁用,从而保留原始的游戏手感。
所有设置均可通过游戏内的配置界面进行调整。
默认行为
- 玩家受到无敌时间的保护。
- 环境伤害(如火焰、甜浆果丛等)不受此限制。
营火伤害不会绕过无敌时间。
- 仅当最后一次伤害来源拥有
minecraft:no_knockback 标签时,才会施加击退效果。
重要提示:更新到新版本后,请重置模组配置(删除配置文件或在游戏内重置),以应用更新后的默认谓词。
高级配置
绕过无敌谓词 (配置: bypassesInvulnerabilityPredicate)
getEntityType(entity) != 'minecraft:player'
&& !include(getSourceTags(source), 'neoforge:is_environment')
&& getSourceType(source) != 'minecraft:campfire'
应用击退谓词 (配置: appliesKnockbackPredicate)
include(getSourceTags(getLastDamageSource(entity)), 'minecraft:no_knockback')
表达式 API
本模组使用 AviatorScript 进行高级自定义。
文档:AviatorScript Wiki
可用变量:
LivingEntity entity, DamageSource source
可用方法:
String getEntityType(Entity entity), Set<String> getEntityTags(Entity entity)
String getSourceType(DamageSource source), Set<String> getSourceTags(DamageSource source)
String getItemType(ItemStack stack), Set<String> getItemTags(ItemStack stack)
DamageSource getLastDamageSource(Entity entity), Entity getEntity(DamageSource source)
Entity getDirectEntity(DamageSource source), ItemStack getWeaponItem(DamageSource source)
日志记录 (配置: logEnabled)
将 logEnabled 设置为 true 可将详细的伤害信息输出到控制台以便调试。您也可以返回一个 HashMap 来自定义日志格式。
ReHurtTime reworks Minecraft’s damage invulnerability mechanic in a lightweight and vanilla-friendly way.
By default, most damage sources bypass the standard invulnerability period, allowing entities to receive damage more consistently. Knockback is disabled by default for bypassed damage, preserving the original feel.
All settings can be adjusted in-game via the configuration screen.
Default Behavior
- Players are protected by invulnerability time.
- Environmental damage (fire, sweet berry bushes, etc.) is excluded.
- Campfire damage does not bypass invulnerability.
- Knockback is only applied when the last damage source has the minecraft:no_knockback tag.
Important: After updating to a new version, please reset the mod configuration (delete the config file or reset in-game) to apply the updated default predicates.
Advanced Configuration
Bypasses Invulnerability Predicate (Config: bypassesInvulnerabilityPredicate)
getEntityType(entity) != 'minecraft:player'
&& !include(getSourceTags(source), 'neoforge:is_environment')
&& getSourceType(source) != 'minecraft:campfire'
Applies Knockback Predicate (Config: appliesKnockbackPredicate)
include(getSourceTags(getLastDamageSource(entity)), 'minecraft:no_knockback')
Expression API
This mod uses AviatorScript for advanced customization.
Documentation: AviatorScript Wiki
Available variables:
LivingEntity entity, DamageSource source
Available methods:
String getEntityType(Entity entity), Set<String> getEntityTags(Entity entity)
String getSourceType(DamageSource source), Set<String> getSourceTags(DamageSource source)
String getItemType(ItemStack stack), Set<String> getItemTags(ItemStack stack)
DamageSource getLastDamageSource(Entity entity), Entity getEntity(DamageSource source)
Entity getDirectEntity(DamageSource source), ItemStack getWeaponItem(DamageSource source)
Logging (Config: logEnabled)
Set logEnabled to true to output detailed damage information to the console for debugging. You can also return a HashMap to fully customize the log format.
评论 0
登录后参与评分
还没有评论,来抢沙发吧