Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_oQJkEJqw.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Mediumcore Fix - 墨喵 Minecraft 资源
Mediumcore Fix 图标

Mediumcore Fix

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/mediumcore-fix
资源信息

Minecraft 版本: 1.20.1

平台: forge

标签: utility

资源介绍

Mediumcore Fix

Fixes health data loss when updating Alex's Mediumcore mod

Minecraft
Forge


Problem

The original Mediumcore in onLivingDeath uses player.getMaxHealth(), which INCLUDES modifiers from external sources (rings, armor, etc.).

Example with a +20 HP ring:

  • maxHealth = 40 (20 base + 20 ring)
  • clippedHealth = clip(40 - 2, 6, 20) = 20 (clamped to maxPlayerHealth!)
  • healthModifiedBy = 0 + (20 - 40) = -20!
  • After respawn: maxHealth = 20 + 0 + (-20) = 0 HP → the player gains 1 HP.

Solution

Introduce BASE_HEALTH_TAG to store the "pure" base health, which is independent of external modifiers.

下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Glowing Hbm's NTM Ores

价格:0 墨喵币
下载量:0

查看详情
ominous bonus key

价格:0 墨喵币
下载量:0

查看详情
CobbleBattleRewards

价格:0 墨喵币
下载量:0

查看详情
SupersLegend

价格:0 墨喵币
下载量:0

查看详情