fixed stained glass not rendering the water
This commit is contained in:
@@ -16,21 +16,9 @@ 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);
|
||||
int id = level->getTile(x, y, z);
|
||||
if (!allowSame && id == this->id) return false;
|
||||
return Tile::shouldRenderFace(level, x, y, z, face);
|
||||
}
|
||||
|
||||
bool HalfTransparentTile::blocksLight()
|
||||
@@ -41,4 +29,4 @@ bool HalfTransparentTile::blocksLight()
|
||||
void HalfTransparentTile::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
icon = iconRegister->registerIcon(texture);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user