▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Mediumcore Fix
Mediumcore Fix

Mediumcore Fix

Fixes a MediumCore mod issue and bugs

228
0

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.

Совместимость

Minecraft: Java Edition

1.20.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Создатели

Детали

Лицензия:LicenseRef-All-Rights-Reserved
Опубликован:3 месяца назад
Обновлён:1 месяц назад
Главная