From 792d4b32e7fade96df54ae369c4a0390b6b62056 Mon Sep 17 00:00:00 2001 From: Shredder Date: Sat, 9 May 2026 06:27:30 +0500 Subject: [PATCH] Fixed Grass Foliage color using foliagecolor.png instead of grasscolor.png Debug Screen now also renders mob id nametags like in beta java SkyDarken is now also no longer clamped in Java Fog Style --- src/client/Minecraft.cpp | 4 ++-- src/client/renderer/entity/MobRenderer.cpp | 12 +++++++++--- src/world/level/Level.cpp | 8 +++++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/client/Minecraft.cpp b/src/client/Minecraft.cpp index 64fb14e7..db32ae29 100755 --- a/src/client/Minecraft.cpp +++ b/src/client/Minecraft.cpp @@ -1159,8 +1159,8 @@ void Minecraft::init() // now i can finally initialize foliage color, probably not the best way to handle this but i cant be arsed rn FoliageColor::init(foliagePixels); - TextureId grassId = (textures->loadTexture("misc/foliagecolor.png")); // loading the uh png for foliage color - int* grassPixels = textures->loadTexturePixels(grassId, "misc/foliagecolor.png"); + TextureId grassId = (textures->loadTexture("misc/grasscolor.png")); // loading the uh png for foliage color + int* grassPixels = textures->loadTexturePixels(grassId, "misc/grasscolor.png"); GrassColor::init(grassPixels); bool tint = options.getBooleanValue(OPTIONS_FOLIAGE_TINT); // finally, toggleable foliage color diff --git a/src/client/renderer/entity/MobRenderer.cpp b/src/client/renderer/entity/MobRenderer.cpp index 3d6b3d9c..137a38b0 100755 --- a/src/client/renderer/entity/MobRenderer.cpp +++ b/src/client/renderer/entity/MobRenderer.cpp @@ -187,10 +187,12 @@ void MobRenderer::scale(Mob* mob, float a) { } void MobRenderer::renderName(Mob* mob, float x, float y, float z) { - /* + std::stringstream ss; ss << mob->entityId; + if (entityRenderDispatcher->minecraft->options.getBooleanValue(OPTIONS_RENDER_DEBUG)) { renderNameTag(mob, ss.str(), x, y, z, 64); - */ + } + } void MobRenderer::renderNameTag(Mob* mob, const std::string& name, float x, float y, float z, int maxDist) { @@ -205,7 +207,11 @@ void MobRenderer::renderNameTag(Mob* mob, const std::string& name, float x, floa float s = 1 / 60.0f * size; glPushMatrix2(); - glTranslatef2((float) x + 0, (float) y + 1.0f /*2.3f*/, (float) z); + if (mob->isPlayer()){ + glTranslatef2((float) x + 0, (float) y + 1.0f, (float) z); + } else { + glTranslatef2((float) x + 0, (float) y + 2.3f, (float) z); + } glRotatef2(-entityRenderDispatcher->playerRotY, 0, 1, 0); glRotatef2(entityRenderDispatcher->playerRotX, 1, 0, 0); diff --git a/src/world/level/Level.cpp b/src/world/level/Level.cpp index b22a6920..21e1a2f9 100755 --- a/src/world/level/Level.cpp +++ b/src/world/level/Level.cpp @@ -1165,7 +1165,13 @@ int Level::getSkyDarken(float a) { float br = 1 - (Mth::cos(td * Mth::PI * 2) * 2 + 0.5f); if (br < 0.0f) br = 0.0f; - if (br > 0.80f) br = 0.80f; //@note; was 1.0f + if (dimension->FogType == 1) // @TODO - probably make this not dependent on dimension type honestly - shredder + { + if (br > 1.0f) br = 1.0f; //@ uses the normal javasky color ramp when java sky type is choosen, + } else + { + if (br > 0.8f) br = 0.8f; //@note; was 1.0f + } return ((int) (br * 11)); }