fix: beacon outer halo washed out behind water

This commit is contained in:
itsRevela
2026-04-28 14:19:22 -05:00
parent 0df5cd865b
commit 89ed116fe0
5 changed files with 50 additions and 19 deletions

View File

@@ -6,6 +6,7 @@
#include "Chunk.h"
#include "EntityRenderDispatcher.h"
#include "TileEntityRenderDispatcher.h"
#include "BeaconRenderer.h"
#include "DistanceChunkSorter.h"
#include "DirtyChunkSorter.h"
#include "MobSkinTextureProcessor.h"
@@ -653,6 +654,30 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a)
mc->gameRenderer->turnOffLightLayer(a); // 4J - brought forward from 1.8.2
}
void LevelRenderer::renderBeaconBeams(float a)
{
if (mc == nullptr || mc->player == nullptr) return;
int playerIndex = mc->player->GetXboxPad();
if (level[playerIndex] == nullptr) return;
BeaconRenderer::s_renderOuterHalo = true;
EnterCriticalSection(&m_csRenderableTileEntities);
for (auto & it : renderableTileEntities)
{
if (!isGlobalIndexInSameDimension(it.first, level[playerIndex])) continue;
for (auto& te : it.second)
{
if (te->GetType() != eTYPE_BEACONTILEENTITY) continue;
TileEntityRenderDispatcher::instance->render(te, a);
}
}
LeaveCriticalSection(&m_csRenderableTileEntities);
BeaconRenderer::s_renderOuterHalo = false;
}
wstring LevelRenderer::gatherStats1()
{
return L"C: " + std::to_wstring(renderedChunks) + L"/" + std::to_wstring(totalChunks) + L". F: " + std::to_wstring(offscreenChunks) + L", O: " + std::to_wstring(occludedChunks) + L", E: " + std::to_wstring(emptyChunks);