fix: crafting table orientation

crafting table was shown in the wrong rotation compared to how it appeared in actual LCE (in the UI)
This commit is contained in:
SevenToaster509
2026-07-15 11:12:56 +01:00
parent 8e0983ad4e
commit 1399ff5a04
+4 -1
View File
@@ -419,7 +419,7 @@ void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<Item
BannerRenderer::instance->renderBannerForGui(x, y, fScaleX, fScaleY, fAlpha, baseColor);
return;
}
if ((item->getIconType() == Icon::TYPE_TERRAIN && TileRenderer::canRender(Tile::tiles[itemId]->getRenderShape())) && itemId != Tile::barrier_Id)
{
PIXBeginNamedEvent(0,"3D gui item render %d\n",itemId);
@@ -447,6 +447,9 @@ void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr<Item
// 0.55 comes from 1/(1+sqrt(2)/sqrt(3)) which is determined by the angles that the cube is rotated in an orthographic projection
glRotatef(180.0f + 30.0f, 1.0f, 0.0f, 0.0f); // Rotate round x axis (centre at origin)
glRotatef(45.0f, 0.0f, 1.0f, 0.0f); // Rotate round y axis (centre at origin)
if (item->id == Tile::crafting_table_Id) {
glRotatef(180, 0, 1, 0);
}
#endif
// 4J-PB - pass the alpha value in - the grass block render has the top surface coloured differently to the rest of the block
glRotatef(-90.0f, 0.0f, 1.0f, 0.0f);