fix: translucent item rendering

This commit is contained in:
Fireblade
2026-07-22 15:07:43 -04:00
parent d41d82faa6
commit 1488469cb2
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -124,8 +124,9 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do
glScalef(s, s, s);
bool bSlimeItem = (tile != nullptr && tile->id == Tile::slimeBlock->id);
if (bSlimeItem)
bool bTranslucentBlockItem = (tile != nullptr && tile->getRenderLayer() >= 2);
if (bTranslucentBlockItem)
{
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_ALPHA_TEST);
@@ -149,7 +150,7 @@ void ItemRenderer::render(shared_ptr<Entity> _itemEntity, double x, double y, do
glPopMatrix();
}
if (bSlimeItem)
if (bTranslucentBlockItem)
{
glDepthMask(true);
glEnable(GL_ALPHA_TEST);