[MekaLivingExtension] - MekaSuit Protection for All Entities
🌟 Description
MekaLivingExtension is a lightweight Minecraft mod that extends Mekanism's MekaSuit damage absorption to all living entities, not just players.
⚙️ How It Works
This mod uses Mixin to intercept Mekanism's damage handling logic:
- CommonPlayerTickHandlerMixin – Intercepts
LivingAttackEventandLivingHurtEvent(1.20.1) orLivingIncomingDamageEvent(1.21.1). - ItemMekaSuitArmorMixin – Accesses private absorption values via
@Accessor. - MekaSuitDamageHelper – Replicates Mekanism's core damage calculation, traverses worn armor, calculates module absorption, and deducts energy accordingly.
For v1.21.1, the event system has been unified, energy types migrated from FloatingLong to long, and damage type lookup now uses the Data Map system.
🔧 Requirements
| Version | Minecraft | Loader | Mekanism | Java |
|---|---|---|---|---|
| 1.20.1 | 1.20.1 | Forge (≥ 47) | ≥ 10.4 | 17 |
| 1.21.1 | 1.21.1 | NeoForge (≥ 21.1.231) | ≥ 10.7 | 21 |

