Cubitect / cubiomes

C library that mimics the Minecraft biome generation.
MIT License
556 stars 98 forks source link

Hardcoded lookup table for the climate-to-biome mapping can trigger some virus scanners #110

Open Cubitect opened 9 months ago

Cubitect commented 9 months ago

The climate-to-biome conversion for 1.18+ requires a large data-tree to store all the biome mappings. Cubiomes currently encodes this data as a hardcoded lookup table inside biome_tree.c. Unfortunately, some virus scanners get triggered by this lookup table, possibly because of the high information density.

Here is a simple example program that triggers 4 scanners on VirusTotal:

#include <biome_tree.c>

int main(int argc, char **argv)
{
    int64_t climate[6] = {0};
    for (int i = 1; i <= 6 && i < argc; i++)
        sscanf(argv[i], "%ld", &climate[i-1]);

    printf("biome: %d\n", p2overworld(MC_1_20, climate, 0));
    return 0;
}

This program does nothing except print the biome ID that corresponds to the climate parameters provided at the command line. (The executable for the scan was compiled on Windows with MinGW 8.1.0)