Fix chunk information disappearing after y256

This commit is contained in:
rtm516 2026-03-07 16:51:33 +00:00
parent db03c26d77
commit c281a65867
No known key found for this signature in database
GPG key ID: 331715B8B007C67A

View file

@ -944,7 +944,8 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
lines.push_back(L"Facing: " + cardinalDirection + L" (" + angleString + L")");
if (minecraft->level != NULL && minecraft->level->hasChunkAt(xBlockPos, yBlockPos, zBlockPos))
// We have to limit y to 256 as we don't get any information past that
if (minecraft->level != NULL && minecraft->level->hasChunkAt(xBlockPos, fmod(yBlockPos, 256), zBlockPos))
{
LevelChunk *chunkAt = minecraft->level->getChunkAt(xBlockPos, zBlockPos);