fix: jui compile due to include ordering

This commit is contained in:
Tropical 2026-04-02 09:21:09 -05:00
parent eacf5ccf30
commit ee2f9961c5
3 changed files with 5 additions and 2 deletions

View file

@ -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;

View file

@ -1,6 +1,7 @@
#include "Gui.h"
#include <cmath>
#include <algorithm>
#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++) {

View file

@ -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