From 74c197cc159b6bb7af73954cf5d3cced539d9cc3 Mon Sep 17 00:00:00 2001 From: piebot <164795032+piebotc@users.noreply.github.com> Date: Thu, 26 Mar 2026 20:41:29 +0300 Subject: [PATCH] apparently the commits i did for glass pane didnt apply so --- Minecraft.Client/ItemInHandRenderer.cpp | 5 +++- Minecraft.Client/TileRenderer.cpp | 40 +++++++++++++++++++++++++ Minecraft.World/HalfTransparentTile.cpp | 12 ++++++++ Minecraft.World/Level.h | 2 +- Minecraft.World/NoteBlockTile.cpp | 2 +- 5 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index 13d4fc20..431c716f 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -243,8 +243,11 @@ void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptrtextures->bindTexture(minecraft->textures->getTextureLocation(Icon::TYPE_TERRAIN)); MemSect(0); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); tileRenderer->renderTile(Tile::tiles[item->id], item->getAuxValue(), SharedConstants::TEXTURE_LIGHTING ? 1.0f : mob->getBrightness(1)); // 4J - change brought forward from 1.8.2 - } + glDisable(GL_BLEND); + } else { MemSect(31); diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp index 927836b1..a945dd0b 100644 --- a/Minecraft.Client/TileRenderer.cpp +++ b/Minecraft.Client/TileRenderer.cpp @@ -8505,6 +8505,44 @@ void TileRenderer::renderTile( Tile* tile, int data, float brightness, float fAl tesselateHopperInWorld(tile, 0, 0, 0, 0, true); glTranslatef(0.5f, 0.5f, 0.5f); } + else if (shape == Tile::SHAPE_THIN_PANE) + { + setShape(7.0f / 16.0f, 0, 0, 9.0f / 16.0f, 1.0f, 1.0f); + + glTranslatef(-0.5f, -0.5f, -0.5f); + t->begin(); + t->normal(0, -1, 0); + renderFaceDown(tile, 0, 0, 0, getTexture(tile, 0, data)); + t->end(); + + t->begin(); + t->normal(0, 1, 0); + renderFaceUp(tile, 0, 0, 0, getTexture(tile, 1, data)); + t->end(); + + t->begin(); + t->normal(0, 0, -1); + renderNorth(tile, 0, 0, 0, getTexture(tile, 2, data)); + t->end(); + + t->begin(); + t->normal(0, 0, 1); + renderSouth(tile, 0, 0, 0, getTexture(tile, 3, data)); + t->end(); + + t->begin(); + t->normal(-1, 0, 0); + renderWest(tile, 0, 0, 0, getTexture(tile, 4, data)); + t->end(); + + t->begin(); + t->normal(1, 0, 0); + renderEast(tile, 0, 0, 0, getTexture(tile, 5, data)); + t->end(); + + glTranslatef(0.5f, 0.5f, 0.5f); + setShape(0, 0, 0, 1, 1, 1); + } t->setMipmapEnable( true ); // 4J added } @@ -8525,6 +8563,8 @@ bool TileRenderer::canRender( int renderShape ) if ( renderShape == Tile::SHAPE_WALL) return true; if ( renderShape == Tile::SHAPE_BEACON) return true; if ( renderShape == Tile::SHAPE_ANVIL) return true; + if (renderShape == Tile::SHAPE_THIN_PANE) return true; + if (renderShape == Tile::SHAPE_WATER) return true; return false; } diff --git a/Minecraft.World/HalfTransparentTile.cpp b/Minecraft.World/HalfTransparentTile.cpp index 6fa63d71..0b8c25c2 100644 --- a/Minecraft.World/HalfTransparentTile.cpp +++ b/Minecraft.World/HalfTransparentTile.cpp @@ -17,6 +17,18 @@ bool HalfTransparentTile::isSolidRender(bool isServerLevel) bool HalfTransparentTile::shouldRenderFace(LevelSource *level, int x, int y, int z, int face) { int id = level->getTile(x, y, z); + if (this->id == 95) // Tile::stained_glass + { + bool isBlocking = level->isTopSolidBlocking(x, y, z); + if (face == 0 && level->isSolidBlockingTile(x, y + 1, z) != isBlocking) return true; // Facing::DOWN + else if (face == 1 && level->isTopSolidBlocking(x, y - 1, z) != isBlocking) return true; // Facing::UP + else if (face == 2 && level->isSolidBlockingTile(x, y, z + 1) != isBlocking) return true; // Facing::NORTH + else if (face == 3 && level->isSolidBlockingTile(x, y, z - 1) != isBlocking) return true; // Facing::SOUTH + else if (face == 4 && level->isSolidBlockingTile(x + 1, y, z) != isBlocking) return true; // Facing::WEST + else if (face == 5 && level->isSolidBlockingTile(x - 1, y, z) != isBlocking) return true; // Facing::EAST + else if (face == 6 && level->isSolidBlockingTile(x, y, z) != isBlocking) return true; // not really a direction? is this supposed to be here? + } + if (!allowSame && id == this->id) return false; return Tile::shouldRenderFace(level, x, y, z, face); } diff --git a/Minecraft.World/Level.h b/Minecraft.World/Level.h index 3892d97e..94a33ab2 100644 --- a/Minecraft.World/Level.h +++ b/Minecraft.World/Level.h @@ -64,7 +64,7 @@ public: public: static const int MAX_XBOX_BOATS = 60; // Max number of boats - static const int MAX_CONSOLE_MINECARTS = 60; + static const int MAX_CONSOLE_MINECARTS = 250; static const int MAX_DISPENSABLE_FIREBALLS = 300; static const int MAX_DISPENSABLE_PROJECTILES = 400; diff --git a/Minecraft.World/NoteBlockTile.cpp b/Minecraft.World/NoteBlockTile.cpp index cafa0c4d..12b2921a 100644 --- a/Minecraft.World/NoteBlockTile.cpp +++ b/Minecraft.World/NoteBlockTile.cpp @@ -79,7 +79,7 @@ bool NoteBlockTile::triggerEvent(Level *level, int x, int y, int z, int i, int n break; } app.DebugPrintf("NoteBlockTile::triggerEvent - playSound - pitch = %f\n",pitch); - level->playSound(x + 0.5, y + 0.5, z + 0.5, iSound, 3, pitch); + level->playSound(x + 0.5, y + 0.5, z + 0.5, iSound, 3, pitch, 64.0f); level->addParticle(eParticleType_note, x + 0.5, y + 1.2, z + 0.5, note / 24.0, 0, 0); return true;