bool CanStretch(BlockID initial, int chunkIndex, int x, int y, int z, int face) { BlockID cur = chunk[chunkIndex]; return(cur == initial && !BlockInfo.IsFaceHidden(cur, chunk[chunkIndex + offsets[face]], face) && (fullBright || (LightCol(X, Y, Z, face, initial) == LightCol(x, y, z, face, cur)))); }
void TestAndStretchX(int xx, int index, byte tile, int chunkIndex, int value, int test, int tileSide, int offset) { index += tileSide; if (counts[index] != 0) { if ((value == test && Y < clipLevel) || (value != test && info.IsFaceHidden(tile, chunk[chunkIndex + offset], tileSide))) { counts[index] = 0; } else { int count = StretchX(xx, index, X, Y, Z, chunkIndex, tile, tileSide); AddVertices(tile, count, tileSide); counts[index] = (byte)count; } } }
bool CanStretch(BlockID initialBlock, int chunkIndex, int x, int y, int z, int face) { BlockID rawBlock = chunk[chunkIndex]; bitFlags[chunkIndex] = ComputeLightFlags(x, y, z, chunkIndex); return(rawBlock == initialBlock && !BlockInfo.IsFaceHidden(rawBlock, chunk[chunkIndex + offsets[face]], face) && (initBitFlags == bitFlags[chunkIndex] // Check that this face is either fully bright or fully in shadow && (initBitFlags == 0 || (initBitFlags & masks[face]) == masks[face]))); }