Malstone x Fantasy Ending Compatibility
A compatibility patch for Minecraft Forge 1.20.1 that fixes the game-crashing conflict between Malstone and Fantasy Ending.
The problem
When both mods are installed, creating a world crashes with a java.lang.StackOverflowError, caused by an endless loop between getMaxHealth and getHealth.
The fix
Fantasy Ending routes every getHealth() call through EntityASMUtil#special_getHealth, which asks for getMaxHealth(). Malstone adds code to getMaxHealth() that calls Player#isAlive(), and vanilla isAlive() calls getHealth() again. The result is infinite recursion.
This patch adds a per-thread re-entrancy guard around the max-health lookup:
- The first call behaves exactly as before, so Malstone's ToughBlood bonus still works.
- Any nested call simply returns the vanilla max-health value instead of recursing forever.
The patch only activates when both Malstone and Fantasy Ending are installed. If either mod is missing, it does nothing.
Requirements
- Minecraft 1.20.1
- Forge 47.x
- Malstone
- Fantasy Ending
Installation
- Install Malstone and Fantasy Ending as usual.
- Drop
malstone_fe_compat-1.0.0.jarinto yourmodsfolder. - Launch the game. Creating a world no longer crashes.
Notes
- This is a client/server-side patch; install it on both sides if you play on a server.
- The repository owner does not understand code or GitHub; this project was created entirely by DeepSeek (an AI assistant).

