public static byte GetSkyLight(BlockCoordinates blockCoordinates, Chunk chunk) { if (chunk == null) { return(15); } int bx = blockCoordinates.X & 0x0f; int by = blockCoordinates.Y & 0xff; int bz = blockCoordinates.Z & 0x0f; return(chunk.GetSkylight(bx, by - 16 * (by >> 4), bz)); }
public byte GetSkylight(int bx, int by, int bz) { Chunk chunk = chunks[by >> 4]; return(chunk.GetSkylight(bx, by - 16 * (by >> 4), bz)); }