feat: implement hardcore hearts with game mode lock

Display hardcore heart textures when a world is in hardcore mode,
matching Java Edition behavior. Hearts switch between normal/hardcore
across all states (poison, wither, flash) and all HUD resolutions.

C++ changes:
- IUIScene_HUD: check isHardcore() and call SetHardcoreMode() each tick
- UIScene_HUD: send hardcore boolean to Flash via Iggy, invalidate
  SetHealth dirty check on state change to force heart redraw
- CreateWorldMenu/LoadMenu: lock game mode to Survival when hardcore
- MinecraftServer: gate server.properties hardcore override behind
  MINECRAFT_SERVER_BUILD so offline worlds preserve their saved flag

SWF changes (via new Java tools):
- AddHardcoreBitmaps: adds 10 hardcore heart bitmaps to graphics SWFs
- AddHardcoreHearts: adds 10 new frames (15-24) to health sprite
- PatchHudABC: patches HUD ActionScript bytecode with SetHardcore
  method and frame offset logic (+14 normal/poison, +6 wither)

Also updates README changelog styling with consistent ### headings.
This commit is contained in:
itsRevela
2026-03-30 13:50:29 -05:00
parent a4f55dde16
commit 3aa2d23fa9
16 changed files with 1537 additions and 29 deletions
+4 -1
View File
@@ -1008,8 +1008,11 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
#endif
levels[i]->getLevelData()->setGameType(gameType);
// Apply hardcore flag from host option to level data so loaded worlds respect server.properties
#ifdef MINECRAFT_SERVER_BUILD
// Dedicated server: server.properties hardcore flag is authoritative
levels[i]->getLevelData()->setHardcore(isHardcore());
#endif
// Offline/client-hosted: keep the world's saved hardcore flag from NBT
if(app.getLevelGenerationOptions() != nullptr)
{