Skip to content

Malstone x Fantasy Ending Compatibility

Fixes the StackOverflowError crash between Malstone and Fantasy Ending on Forge 1.20.1.

<1,000 downloads Updated

No ratings yet

Be the first to rate it.

Rate it

Community listing page

Community listing page, reviews may not be monitored by the author.

About

Description

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

Notes

  • This is a client/server-side patch; install it on both sides if you play on a server.