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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Stat's

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

查看详情
BC's Custom Music Disc Sounds

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

查看详情
Aieau's traps

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

查看详情
Confetti Cannon

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

查看详情