From ee2f9961c5f2ff5b2a5a9da1d58c2e00d9b6e20f Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Thu, 2 Apr 2026 09:21:09 -0500 Subject: [PATCH] fix: jui compile due to include ordering --- targets/app/common/src/UI/UIController.cpp | 1 + targets/minecraft/client/gui/Gui.cpp | 5 +++-- .../minecraft/client/gui/achievement/AchievementPopup.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/targets/app/common/src/UI/UIController.cpp b/targets/app/common/src/UI/UIController.cpp index 817005d3d..6e5fd2d69 100644 --- a/targets/app/common/src/UI/UIController.cpp +++ b/targets/app/common/src/UI/UIController.cpp @@ -47,6 +47,7 @@ #include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/client/title/TitleScreen.h" #include "strings.h" class Tutorial; diff --git a/targets/minecraft/client/gui/Gui.cpp b/targets/minecraft/client/gui/Gui.cpp index 374c171af..facc81a74 100644 --- a/targets/minecraft/client/gui/Gui.cpp +++ b/targets/minecraft/client/gui/Gui.cpp @@ -1,6 +1,7 @@ #include "Gui.h" #include +#include #include "platform/PlatformTypes.h" #include "platform/sdl2/Input.h" @@ -513,7 +514,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) { int NUM_HEARTS_PER_ROW = 10; // 4jcraft: missing definition int numHealthRows = Mth::ceil((maxHealth + totalAbsorption) / 2 / (float)NUM_HEARTS_PER_ROW); - int healthRowHeight = max(10 - (numHealthRows - 2), 3); + int healthRowHeight = std::max(10 - (numHealthRows - 2), 3); yLine2 = yLine1 - (numHealthRows - 1) * healthRowHeight - 10; double absorption = totalAbsorption; @@ -649,7 +650,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) { int baseHealth = 0; while (hearts > 0) { - int rowHearts = min(hearts, 10); + int rowHearts = std::min(hearts, 10); hearts -= rowHearts; for (int i = 0; i < rowHearts; i++) { diff --git a/targets/minecraft/client/gui/achievement/AchievementPopup.cpp b/targets/minecraft/client/gui/achievement/AchievementPopup.cpp index 017767e9b..fcab78a71 100644 --- a/targets/minecraft/client/gui/achievement/AchievementPopup.cpp +++ b/targets/minecraft/client/gui/achievement/AchievementPopup.cpp @@ -10,6 +10,7 @@ #include "minecraft/client/renderer/entity/ItemRenderer.h" #include "minecraft/locale/I18n.h" #include "minecraft/stats/Achievement.h" +#include "minecraft/client/Lighting.h" AchievementPopup::AchievementPopup(Minecraft* mc) { // 4J - added initialisers