apparently the commits i did for glass pane didnt apply so

This commit is contained in:
piebot 2026-03-26 20:41:29 +03:00
parent 42af4ed545
commit 74c197cc15
5 changed files with 58 additions and 3 deletions

View file

@ -243,8 +243,11 @@ void ItemInHandRenderer::renderItem(shared_ptr<LivingEntity> mob, shared_ptr<Ite
MemSect(31);
minecraft->textures->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);

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;

View file

@ -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;