Git Product home page Git Product logo

cubiomes's Introduction

cubiomes

Cubiomes is a standalone library, written in C, that mimics the biome and feature generation of Minecraft Java Edition. It is intended as a powerful tool to devise very fast, custom seed-finding applications and large-scale map viewers with minimal memory usage.

Cubiomes-Viewer

If you want to get started without coding, there is now also a graphical application based on this library.

Audience

You should be familiar with the C programming language. A basic understanding of the Minecraft biome generation process would also be helpful.

Getting Started

This section is meant to give you a quick starting point with small example programs if you want to use this library to find your own biome-dependent features.

Biome Generator

Let's create a simple program called find_biome_at.c which tests seeds for a Mushroom Fields biome at a predefined location.

// check the biome at a block position
#include "generator.h"
#include <stdio.h>

int main()
{
    // Set up a biome generator that reflects the biome generation of
    // Minecraft 1.18.
    Generator g;
    setupGenerator(&g, MC_1_18, 0);

    // Seeds are internally represented as unsigned 64-bit integers.
    uint64_t seed;
    for (seed = 0; ; seed++)
    {
        // Apply the seed to the generator for the Overworld dimension.
        applySeed(&g, DIM_OVERWORLD, seed);

        // To get the biome at a single block position, we can use getBiomeAt().
        int scale = 1; // scale=1: block coordinates, scale=4: biome coordinates
        int x = 0, y = 63, z = 0;
        int biomeID = getBiomeAt(&g, scale, x, y, z);
        if (biomeID == mushroom_fields)
        {
            printf("Seed %" PRId64 " has a Mushroom Fields biome at "
                "block position (%d, %d).\n", (int64_t) seed, x, z);
            break;
        }
    }

    return 0;
}

You can compile this code either by directly adding a target to the makefile via

$ cd cubiomes
$ make libcubiomes

...or you can compile and link to a cubiomes archive using either of the following commands.

$ gcc find_biome_at.c libcubiomes.a -fwrapv -lm   # static
$ gcc find_biome_at.c -L. -lcubiomes -fwrapv -lm  # dynamic

Both commands assume that your source code is saved as find_biome_at.c in the cubiomes working directory. If your makefile is configured to use pthreads, you may also need to add the -lpthread option to the compiler. The option -fwrapv enforces two's complement for signed integer overflow, which this library relies on. It is not strictly necessary for this example as the library should already be compiled with this flag, but it is good practice to prevent undefined behaviour. Running the program should output:

$ ./a.out
Seed 262 has a Mushroom Fields biome at block position (0, 0).

Biome Generation in a Range

We can also generate biomes for an area or volume using genBiomes(). This will utilize whatever optimizations are available for the generator and can be much faster than generating each position individually. (The layered generators for versions up to 1.17 will benefit significantly more from this than the noise-based ones.)

Before we can generate the biomes for an area or volume, we need to define the bounds with a Range structure and allocate the necessary buffer using allocCache(). The Range is described by a scale, position, and size, where each cell inside the Range represents the scale of many blocks in the horizontal axes. The vertical direction is treated separately and always follows the biome coordinate scaling of 1:4, except for when scale == 1, in which case the vertical scaling is also 1:1.

The only supported values for scale are 1, 4, 16, 64, and (for the Overworld) 256. For versions up to 1.17, the scale is matched to an appropriate biome layer and will influence the biomes that can generate.

// generate an image of the world
#include "generator.h"
#include "util.h"

int main()
{
    Generator g;
    setupGenerator(&g, MC_1_18, LARGE_BIOMES);

    uint64_t seed = 123LL;
    applySeed(&g, DIM_OVERWORLD, seed);

    Range r;
    // 1:16, a.k.a. horizontal chunk scaling
    r.scale = 16;
    // Define the position and size for a horizontal area:
    r.x = -60, r.z = -60;   // position (x,z)
    r.sx = 120, r.sz = 120; // size (width,height)
    // Set the vertical range as a plane near sea level at scale 1:4.
    r.y = 15, r.sy = 1;

    // Allocate the necessary cache for this range.
    int *biomeIds = allocCache(&g, r);

    // Generate the area inside biomeIds, indexed as:
    // biomeIds[i_y*r.sx*r.sz + i_z*r.sx + i_x]
    // where (i_x, i_y, i_z) is a position relative to the range cuboid.
    genBiomes(&g, biomeIds, r);

    // Map the biomes to an image buffer, with 4 pixels per biome cell.
    int pix4cell = 4;
    int imgWidth = pix4cell*r.sx, imgHeight = pix4cell*r.sz;
    unsigned char biomeColors[256][3];
    initBiomeColors(biomeColors);
    unsigned char *rgb = (unsigned char *) malloc(3*imgWidth*imgHeight);
    biomesToImage(rgb, biomeColors, biomeIds, r.sx, r.sz, pix4cell, 2);

    // Save the RGB buffer to a PPM image file.
    savePPM("map.ppm", rgb, imgWidth, imgHeight);

    // Clean up.
    free(biomeIds);
    free(rgb);

    return 0;
}

Structure Generation

The generation of structures can usually be regarded as a two-stage process: generation attempts and biome checks. For most structures, Minecraft divides the world into a grid of regions (usually 32x32 chunks) and performs one generation attempt in each. We can use getStructurePos() to get the position of such a generation attempt, and then test whether a structure will actually generate there with isViableStructurePos(); however, this is more expensive to compute (requiring many microseconds instead of nanoseconds).

Note: some structures (in particular desert pyramids, jungle temples, and woodland mansions) in 1.18 no longer depend solely on the biomes and can also fail to generate based on the surface height near the generation attempt. Unfortunately, cubiomes does not provide block-level world generation and cannot check for this, and may therefore yield false positive positions. Support for an approximation of the surface height might be added in the future to improve accuracy.

// find a seed with a certain structure at the origin chunk
#include "finders.h"
#include <stdio.h>

int main()
{
    int structType = Outpost;
    int mc = MC_1_18;

    Generator g;
    setupGenerator(&g, mc, 0);

    uint64_t lower48;
    for (lower48 = 0; ; lower48++)
    {
        // The structure position depends only on the region coordinates and
        // the lower 48-bits of the world seed.
        Pos p;
        if (!getStructurePos(structType, mc, lower48, 0, 0, &p))
            continue;

        // Look for a seed with the structure at the origin chunk.
        if (p.x >= 16 || p.z >= 16)
            continue;

        // Look for a full 64-bit seed with viable biomes.
        uint64_t upper16;
        for (upper16 = 0; upper16 < 0x10000; upper16++)
        {
            uint64_t seed = lower48 | (upper16 << 48);
            applySeed(&g, DIM_OVERWORLD, seed);
            if (isViableStructurePos(structType, &g, p.x, p.z, 0))
            {
                printf("Seed %" PRId64 " has a Pillager Outpost at (%d, %d).\n",
                    (int64_t) seed, p.x, p.z);
                return 0;
            }
        }
    }
}

Quad-Witch-Huts

A commonly desired feature is Quad-Witch-Huts or similar multi-structure clusters. To test for these types of seeds, we can look a little deeper into how the generation attempts are determined. Notice that the positions depend only on the structure type, region coordinates, and the lower 48 bits of the seed. Also, once we have found a seed with the desired generation attempts, we can move them around by transforming the 48-bit seed using moveStructure(). This means there is a set of seed bases that can function as a starting point to generate all other seeds with similar structure placement.

The function searchAll48() can be used to find a complete set of 48-bit seed bases for a custom criterion. Given that in general, it can take a very long time to check all 2^48 seeds (days or weeks), the function provides some functionality to save the results to disk which can be loaded again using loadSavedSeeds(). Luckily, it is possible in some cases to reduce the search space even further: for Swamp Huts and structures with a similar structure configuration, there are only a handful of constellations where the structures are close enough together to run simultaneously. Conveniently, these constellations differ uniquely at the lower 20 bits. (This is hard to prove, or at least I haven't found a rigorous proof that doesn't rely on brute forcing.) By specifying a list of lower 20-bit values, we can reduce the search space to the order of 2^28, which can be checked in a reasonable amount of time.

// find seeds with a quad-witch-hut about the origin
#include "quadbase.h"
#include <stdio.h>

int check(uint64_t s48, void *data)
{
    const StructureConfig sconf = *(const StructureConfig*) data;
    return isQuadBase(sconf, s48 - sconf.salt, 128);
}

int main()
{
    int styp = Swamp_Hut;
    int mc = MC_1_18;
    uint64_t basecnt = 0;
    uint64_t *bases = NULL;
    int threads = 8;
    Generator g;

    StructureConfig sconf;
    getStructureConfig(styp, mc, &sconf);

    printf("Preparing seed bases...\n");
    // Get all 48-bit quad-witch-hut bases, but consider only the best 20-bit
    // constellations where the structures are the closest together.
    int err = searchAll48(&bases, &basecnt, NULL, threads,
        low20QuadIdeal, 20, check, &sconf);

    if (err || !bases)
    {
        printf("Failed to generate seed bases.\n");
        exit(1);
    }

    setupGenerator(&g, mc, 0);

    uint64_t i;
    for (i = 0; i < basecnt; i++)
    {
        // The quad bases by themselves have structures in regions (0,0)-(1,1)
        // so we can move them by -1 regions to have them around the origin.
        uint64_t s48 = moveStructure(bases[i] - sconf.salt, -1, -1);

        Pos pos[4];
        getStructurePos(styp, mc, s48, -1, -1, &pos[0]);
        getStructurePos(styp, mc, s48, -1,  0, &pos[1]);
        getStructurePos(styp, mc, s48,  0, -1, &pos[2]);
        getStructurePos(styp, mc, s48,  0,  0, &pos[3]);

        uint64_t high;
        for (high = 0; high < 0x10000; high++)
        {
            uint64_t seed = s48 | (high << 48);
            applySeed(&g, DIM_OVERWORLD, seed);

            if (isViableStructurePos(styp, &g, pos[0].x, pos[0].z, 0) &&
                isViableStructurePos(styp, &g, pos[1].x, pos[1].z, 0) &&
                isViableStructurePos(styp, &g, pos[2].x, pos[2].z, 0) &&
                isViableStructurePos(styp, &g, pos[3].x, pos[3].z, 0))
            {
                printf("%" PRId64 "\n", (int64_t) seed);
            }
        }
    }

    free(bases);
    return 0;
}

Strongholds and Spawn

Strongholds, as well as the world spawn point, actually search until they find a suitable location, rather than checking a single spot like most other structures. This causes them to be particularly performance expensive to find. Furthermore, the positions of strongholds have to be generated in a certain order, which can be done in iteratively with initFirstStronghold() and nextStronghold(). For the world spawn, the generation starts with a search for a suitable biome near the origin and will continue until a grass or podzol block is found. There is no reliable way to check actual blocks, so the search relies on a statistic, matching grass presence to biomes. Alternatively, we can simply use estimateSpawn() and terminate the search after the first biome check under the assumption that grass is nearby.

// find spawn and the first N strongholds
#include "finders.h"
#include <stdio.h>

int main()
{
    int mc = MC_1_18;
    uint64_t seed = 3055141959546LL;

    // Only the first stronghold has a position that can be estimated
    // (+/-112 blocks) without biome check.
    StrongholdIter sh;
    Pos pos = initFirstStronghold(&sh, mc, seed);

    printf("Seed: %" PRId64 "\n", (int64_t) seed);
    printf("Estimated position of first stronghold: (%d, %d)\n", pos.x, pos.z);

    Generator g;
    setupGenerator(&g, mc, 0);
    applySeed(&g, DIM_OVERWORLD, seed);

    pos = getSpawn(&g);
    printf("Spawn: (%d, %d)\n", pos.x, pos.z);

    int i, N = 12;
    for (i = 1; i <= N; i++)
    {
        if (nextStronghold(&sh, &g) <= 0)
            break;
        printf("Stronghold #%-3d: (%6d, %6d)\n", i, sh.pos.x, sh.pos.z);
    }

    return 0;
}

cubiomes's People

Contributors

aeroastroid avatar alex-chew avatar badel2 avatar camelpilot33 avatar cubitect avatar earthcomputer avatar fwiffo avatar jewe37 avatar kaisandstrom avatar kbinani avatar nel-s avatar rabbit0w0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cubiomes's Issues

Legacy Console Edition biomes and Bedrock biomes

I was looking into the biome generations for Minecraft 1.2.1-1.6.4 and Legacy Console Editions.


For Legacy Console Edition, the versions of focus described below will mainly focus on TU32-53, which is the Java equivalent of 1.8.1 through 1.10.2. Legacy Console Edition was updated until TU68, the equivalent of Java 1.12.2 which was the final update before Xbox One/Switch moved to bedrock and Xbox 360/PS3/Wii U got discontinued.

To Support Legacy Console Edition versions TU32-TU53, we can just make a copy of the Java 1.10.2 generation, and make a single change below:
image

Basically, all that needs to be done is to disable 2 Zoom Layers between Biome 1:256 and Biome Edge 1:64. This only applies to the Biome generation of the layer stack. The noise stack and the river stack are exactly the same as Java edition. This basically downscales the final biome map by 4x. Everything else is exactly the same as Java edition.

The spawnpoint and locations of villages and temples are exactly the same in Java version 1.10.2 and legacy console edition TU53, as they use the same exact salts, spacing, separation as Java edition 1.10.2. The only inaccuracies are strongholds and woodland mansions. Villages are correct for Xbox One/PS4/Switch but not Xbox 360/PS3/Wii U, this is due to the older consoles only having 864x864 worlds and the newer consoles have 5120x5120 worlds (originated at 0,0, up to 2560 blocks from 0,0).

That's basically it, legacy console is basically exactly the same as Java 1.10.2 (or 1.12.2), with a single change. Aside from strongholds (and woodland mansions) not working.


For Minecraft Java 1.2.1 - 1.6.4, the first 5 layers appear to be the same in Java 1.6.4 and below as well as Java 1.7.2+.

Villages, Witch Huts (1.4.2+), and Jungle/Desert Temples (1.3.1+), keep the same salts and everything. A lot of the layer seeds for the Java 1.7.2+ appear to have been carried over from the 1.6.4 and older versions.

image

Mutated biomes generate differently in 1.13

There are some differences in the generation of mutated biomes in 1.13 that are marked as WAI. MC-125037 discusses the details, but apparently the mutated attribute no longer leaks into neighboring biomes. That's more-or-less consistent with what appears in the game and in Amidst.

This obviously also indirectly affects structure generation. For example, for seed -8245890327006074204, there is a taiga village at -876,1332 in 1.13, but none in 1.12.2 (where it's a taiga M biome instead of regular taiga).

As far as I can tell, this only affects the boundaries of mutated biomes; any boundaries between regular biomes is unaffected.

1.12.2
-8245890327006074204_1_12_2

1.13-pre4
-8245890327006074204_1_13

find_quadhuts produces invalid quad hut seeds nondeterministically

Sometimes run produce a list a valid seeds:

$ ./find_quadhuts |head
Usage:
find_quadhuts [regionX] [regionZ]
Defaulting to origin.

118219975020360070
273875637141352838
311593284020580742
466404521211441542
499900043440009606
565765187990303110
...

But about half the time, it produces a list of seeds which are not quad huts:

$ ./find_quadhuts |head
Usage:
find_quadhuts [regionX] [regionZ]
Defaulting to origin.

480672816547434481
929343929424220145
992394324207407089
2336718812977500145
3784344618200403953
4065538119934349297
...

I'm still trying to narrow down which portion of the search is nondeterministic.

How do I run this?

I tried to run the example code given in the README file using Visual Studio, but I couldn't get it to work. I got hundreds of errors from the finders.h file, so I assume that I didn't install cubiomes correcty, but I have no idea what I did wrong.

Structure Rotation Finder?

Is there a way to find the structure rotation after using getStructurePos()?
Some structures have non-square bounding boxes and it would be useful to be able to accurately find the corners of a structure.

Thanks.

GPL is not a good choice of license for library code

There has been some interest in including cubiomes as one biome generator option for the cuberite minecraft-compatible gameserver project. Unfortunately cuberite is Apache and cubiomes GPL, so cubiomes support cannot be included in cuberite.

If being included in free minecraft-compatible server software is something this project is interested in, it would be a good idea to consider changing the license. Most server projects are Apache or MIT licensed rather than GPL.

Quad Monument Finder

Could you commit the code you use to get the quad monument seeds in the seeds subdirectory? I'd love to take a look. I'm unfamiliar with Minecraft worldgen and would probably end up writing a naive implementation that's not efficient at all.

Cannot load seed lists

Whenever a file gets selected with a seed list, it says "Failed to load seed list from file". The file simply contains the a paste grabbed from cubiomes-viewer.

approxInnerStrongholdRing does not have claimed accuracy

In the documentation of of approxInnerStrongholdRing we find:

 * Note that this function requires only the lower 48-bits of the seed, and the
 * accuracy is within +/-112 blocks.

But I've found this not to be true. E.g.:

#include <stdio.h>
#include "finders.h"

int main(int argc, char** argv) {
    int mcversion = MC_1_16;
    initBiomes();
    LayerStack g;
    setupGenerator(&g, mcversion);


    int64_t seed = 707347623312870631;
    Pos p[3];

    approxInnerStrongholdRing(p, mcversion, seed);
    for (int i = 0; i < 3; ++i) {
        p[i].x = (p[i].x << 4) + 8;
        p[i].z = (p[i].z << 4) + 8;
    }
    printf("Approx: (%d, %d) (%d, %d) (%d, %d)\n", p[0].x, p[0].z, p[1].x, p[1].z, p[2].x, p[2].z);

    applySeed(&g, seed);
    findStrongholds(mcversion, &g, NULL, p, seed, 3, 1);
    printf("Exact: (%d, %d) (%d, %d) (%d, %d)\n", p[0].x, p[0].z, p[1].x, p[1].z, p[2].x, p[2].z);

    return 0;
}

prints

Approx: (-216, -1528) (2424, 968) (-1144, 920)
Exact: (-116, -1532) (1736, 540) (-1160, 936)

Note that the second stronghold is 800 blocks away from its approximated location.

Ocean Monument False Positives in 1.8

The isViableStructurePos function is unreliable for ocean monuments in 1.8 world generation. In my test program monument_test.c 5 of the 10 output seeds do not have an ocean monument in region (0,0). This does not seem to be the case with 1.16 world generation, where all 4 output seeds do have an ocean monument in the desired region.

Sorry if this is not on topic, but it is an issue for a different mod by Cubitech. (ASM Mod Suit)

Hello, I was trying to install the ASM Mod Suit for 1.13.1 snapshot 18w31a, but it wouldn't work. Seeing that there was no activity in the issues section for that mod, I decided to post here. If this is too off topic or inappropriate for this mod issues section, please feel free to close it or ignore it.

The issue is that when I try to install it, it says the version is not supported. I really don't know much about coding, so it is difficult to exactly troubleshoot what is going on.

issue

I completely understand if you are unable to fix this at this time, or if it is totally impossible to fix. It seems you are working really hard on the cubiomes mod, so I understand if you do not have time to work on the ASM Mod Suit. Any help or response is greatly appreciated!

Village generation biome list error

Village generation is possible in Snowy Tundra in Minecraft Java Edition as of 1.14.
Yet the list in cubiomes states as:
static const int villageBiomeList[] = {plains, desert, savanna, taiga};
There does not seem to be a mechanism to switch to another biome list in the library.
Is this perhaps an oversight?

[Feature Request] Find seeds with biomes at specific coordinates

Hi, I think it would be really nice to be able to specify where we want the biomes. My use case is finding the seed of an existing world without having access to it (for example a server).

I suggest to load the biome info from a file with the following format, one condition per line:

// X Z BIOME_ID
0 0 1
100 200 7

Which would then search for seeds with plains at (0, 0) and river at (100, 200).

Anyway, nice project, keep working on it!

getBiomeAtPos failed to give right ID

#include "finders.h"
#include "generator.h"
#include "layers.h"

int main(int argc, char *argv[])
{
initBiomes();
LayerStack g = setupGenerator();
Pos pos;
pos.x=0;pos.z=0;
applySeed(&g, 5);
int biome=getBiomeAtPos(g, pos);
printf("%d\n",biome);
freeGenerator(g);
}

Hello,
So i was trying to reproduce the world generation of MC in python (which doesnt work for now, i have some issue with how BaseSeed,worldGenSeed and Chunkseed are set, link here in case: https://github.com/hube12/genlayer ) and i decided to debug my calls with your generation tool but that seems to not work at all.
For instance i wrote that little script to generate the whole layer stack and get the biome pos at 0 0 on seed 5 but it return 1 on my side (for plains) instead of the 24 (for deep ocean) generated via starting MC.
I was wondering if i was doing something wrong or if your tool does certain approximation that make unreliable results on small scale.

Btw i am not sure to get why you do that here (layer.c mapZoom not optimized)

        register int cs = ss;
        cs += chunkX;
        cs *= cs * 1284865837 + 4150755663;
        cs += chunkZ;
        cs *= cs * 1284865837 + 4150755663;
        cs += chunkX;
        cs *= cs * 1284865837 + 4150755663;
        cs += chunkZ;

instead of calling the setChunkSeed as done in the MC code which use 6364136223846793005 and 1442695040888963407. (or is it one approximation and because i run on window and not a posix env it select that one which lead to bad results? (i will rule that out with the tests i made but still doesnt understand it))

Regards,
Hube

1.18 support

Are there any plans on supporting 1.18, sooner or later?
I built a web app (mcseeder.com, the code is open source) around your project and I would love to be able to update it to the new version once it comes out. I'll even try to give you some help, if needed, but I would be almost new to programming in C so I wouldn't be that much helpful, I guess!

search4QuadBases returns no seeds (in file) when using MONUMENT_CONFIG

I tried modifying the quad witch seed finder to find Quad monuments.
All I changed was featureConfig = MONUMENT_CONFIG
and the biomes from swampland to deepocean. but whenever i run the program it returns nothing for Quad Monument seeds (I mean the search4QuadBases does return no seeds) in the file.

Probably me messing something up, could you help with that.
Sorry for bothering.

Rendermap Int issue

I keep either getting segfaults or seed must be an integer for large ints making most seeds error (unless it is less than 116740

Shipwrecks and Ocean Ruins

I've implemented shipwrecks and ocean ruins, but it's a bit clunky because they use different region sizes, and ocean ruins triggers the power-of-two special case in the Java RNG. So it adds branching and two new parameters to the "fast" location finding functions, which is ugly.

Alternatively, I could just add separate versions of the functions for shipwrecks and ocean ruins, as is done with ocean monuments and woodland mansions.

Do you have a preference?

1.14.2 support

I'm curious if @fwiffo's fork of the library would work the same in 1.14.2 as they are in 1.13.2, and if not, then when an update to support that version could be expected.

Problem with biome calculation.

I write the following code:

#include "finders.h"
#include "generator.h"
#include "layers.h"

#include <unistd.h>

#include <stdio.h>

int main(){
	initBiomes();
	LayerStack g = setupGenerator();
	Layer *_Biome = &g.layers[L_BIOME_256];
    int *biomeCache = allocCache(_Biome, 3, 3);
	setWorldSeed(_Biome, -6593745682071834521);

	while(1){
		Pos pos;
		int a,b;
		scanf("%d%d",&a,&b);
		pos.x=a;pos.z=b;

		genArea(_Biome, biomeCache, (a<<1)+2,  (b<<1)+2, 1, 1);
		applySeed(&g, -6593745682071834521);
		
		int biome=getBiomeAtPos(g, pos);
		printf("%d\n",biome);
	}
	free(biomeCache);
    freeGenerator(g);
	return 0;
}

Expecting it to show the biome of given location with seed=-6593745682071834521.

When I enter -94 220 , the program gives out 1 . However the biome at this location is Extreme Hills, which isn't 1 in the enum.

So I wonder if I misused your code or there is something wrong with it?

There are some parameters I don't know the meaning.

Minecraft Version: 1.12.2

Feature request: World Spawn Point

I've noticed that the world spawn point is not always at (0, 0) but wasn't sure exactly how it worked so was afraid it's decided late in the generation process. However, I'm told by code diggers that it is actually not and that it's, as far as I understand, a matter of finding an appropriate biome near the center and if not then (0, 0) is used. Could we have a function to help with this?

Undefined behaviour

I compiled using gcc with the -O3 option and the code doesn't work. I looked into the code and found a lot of arithmetic with ints
that could overflow, such as lines 739 to 746 in layers.c. Signed integer overflow is undefined behaviour and although it will work as they are two's compliment and should not cause a problem in the mentioned lines, the compiler assumes the user isn't relying on undefined behaviour while optimising and can cause the produced binary to not work. You can change it by changing some of the ints to unsigneds.

A few bugs I might want to list (please let it open)

This is mainly a list of the current bugs with your lib and common pitfall (we address them in biomeutils)

Making those two changes will allow you to correct your stronghold accuracy (for those specific cases only tho)
Example:
Load 1437905338718953247 and go at (x,z)=(-20480,808) you can use Minemap https://github.com/hube12/MineMap/releases/tag/1.31 , load both 1.16.1 and 1.16.2 you will get those 2 differents ones
1.16.2+: /tp @s -20040 ~ 1352
1.16.1- : /tp @s -20392 ~ -120

1 16 2+
1 16 1-

Macro 'U' conflicts with identifiers in other libraries.

cubiomes defines a macro 'U' to abbreviate __builtin_unlikely. This is convenient, but precludes using 'U' as a variable name in any code included alongside cubiomes. Notably "U" is frequently used as a template parameter name in C++ code. Adding "#undef U" after including cubiomes is, of course, a workaround, but is suboptimal.

pthread.h missing for compiling?

Hello I am trying to get this to compile and I get this as an error:

make
gcc -c -Wall -fwrapv -march=native -O3 find_quadhuts.c
In file included from find_quadhuts.c:9:0:
finders.h:7:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
makefile:23: recipe for target 'find_quadhuts.o' failed
make: *** [find_quadhuts.o] Error 1

(Also I would love a more detailed explanation of how to make this work!) It seems way faster and more efficient for searching for seeds than what I am building... if your curious: https://github.com/Zodsmar/SeedSearcherStandaloneTool

Thanks!

Is there a way to find mob spawner clusters from a seed?

By mob spawner clusters I mean: mob spawners that are close enough to each other so that a point between them where all are simultaneously active (within 16-block distance of the point) exists.

I'm pretty sure cubiomes is capable of this, but I'm not sure where to start. My initial idea is to just keep generating chunks around a block, check for clusters using those chunks and print if there is, go to the next block and repeat but I'm kind of skeptical about the performance of this plan

Features Request: Fortresses

I've noticed you've started working on Nether generation. Presumably, this means we'll be able to look for fortresses soon. Would it be possible to also look into structure generation? A common thing people might look for is fortresses with 5 four-way crossings in soul sand valleys, in order to build farms. However, I'm not sure whether the generation of the structure is dependent on further stages of the terrain generation; if so, it might not be feasible.

Finding villages?

I am looking for seeds with an island spawn, near a mooshroom island with villager Islands nearby. I have been very successful at finding seeds with the first 2 criteria (my finder finds a new one every 2 seconds) but I haven not figured out how to look for villages yet.

Do I need to do a brute force find by scanning through every region within 500 blocks of spawn or is there a faster way to find villages?

Is there any way to know if a region contains a village? Is isViableVillagePos sufficient, the name implies that it is not?

p.s. my island finding code is available here https://github.com/nathanowen42/cubiomes It is in C++ but you could port it to C easy enough... Also I found and fixed a couple of possible bugs which my C++ compiler found when using -Wextra.

Small inaccuracies in biome generation at 1:4 scale

Hi, I have a repo where I compare the biomes generated by cubiomes with the biomes that are stored in the region files of a generated world:

https://github.com/badel2/cubiomes-test-generation

I tried it with a world generated using snapshot 1.18-rc3, and there are some small differences at some biome borders, usually only 1 block. Is there some option to enable high accuracy? My code is here.

Test cases: coordinates are at 1:4 scale, expected is the one read from the world files, got is the one from cubiomes:
Seed 1234
Biome mismatch at (-95, -16, -56), expected 4 got 7
Biome mismatch at (-79, -16, -53), expected 7 got 0
Biome mismatch at (-136, -16, 13), expected 4 got 1

Some images, the incomplete image is the one from the world files:

seed_1234_cubiomes
seed_1234_fastanvil

Diff, basically the 4 pixels that stand out:

seed_1234_cubiomes_fastanvil_diff

Questionable right shift beaviour?

I've been looking through the finders, specifically in getStructurePos() and have noticed that bit shifts are extensively used. Apparently the behaviour that makes this work is gcc specific?
My main question is if there is a workaround for getStructurePos() that doesn't require this specific bit shift behaviour / or some way to perform the same shifting in another language.

The value of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a signed type and a non-negative value, the value of the result is the integral part of the quotient of E1/2E2. If E1 has a signed type and a negative value, the resulting value is implementation-defined.

Quote

Perhaps this other issue is linked, but they don't mention what compiler they're using.
#22 (comment)

Thanks.

ignore - observations were completely incorrect

Wrong results from getStructurePos?

Hi

I'm trying to use getStructurePos to find a seed with an outpost near spawn, from looking at the two provided examples I've stitched together the following

#include "finders.h"
#include "generator.h"
#include "layers.h"

#include <unistd.h>

int isValidBiome(int);

int main(int argc, char *argv[])
{
    // Always initialize the biome list before starting any seed finder or
    // biome generator.
    initBiomes();

    int64_t seedStart, seedEnd;

    seedStart = 0;
    seedEnd = 100000000LL;
    StructureConfig featureConfig;

    featureConfig = OUTPOST_CONFIG;

    unsigned int range;

    int regPosX = 0;
    int regPosZ = 0;

    regPosX -= 1;
    regPosZ -= 1;

    range = 200;

    LayerStack g = setupGenerator(MC_1_13);
    int *cache = allocCache(&g.layers[L_VORONOI_ZOOM_1], range, range);

    int64_t s, base;

    Pos outpostPos;

    for (s = seedStart; s < seedEnd; s++)
    {
        base = moveStructure(s, regPosX, regPosZ);
        outpostPos = getStructurePos(featureConfig, base, 0+regPosX, 0+regPosZ);

        //Validate that position is valid biome
        if (!isValidBiome(getBiomeAtPos(g, outpostPos))) continue;

        printf("%ld\n", s);
        printf("%d\n", outpostPos.x);
        printf("%d\n", outpostPos.z);
        fflush(stdout);
    }

    freeGenerator(g);
    free(cache);
}

int isValidBiome(int biomeId) {
    int validBiomes[] = {
        plains,
        desert,
        savanna,
        taiga,
        snowy_tundra,
        snowy_taiga,
    };

    int i;
    for (i = 0; i < sizeof(validBiomes) / sizeof(int); i++) {
        if (validBiomes[i] == biomeId) {
            return 1;
        }
    }

    return 0;
}

which outputs seeds and coordinates, however I've not yet managed to find a correct set where the coordinates actually had an outpost? From looking at the quad_huts file the biomecheck seems necessary, but am I missing something else?

Thank you for your itme
Which outputs seeds

Includes typo in finders.h

Hello!

I'm writing to you because I noticed that in finders.h, windows.h is typo'd as Windows.h, which causes a problem as it's case sensitive.

cubiomes/finders.h:11:10: fatal error: Windows.h: No such file or directory 11 | #include <Windows.h> |

I manually changed this in my copy of the file, but it seemed too minor of a change to be worth PRing it in.

If you'd like me to PR that in, I can, but I figured it was minor enough that it can be resolved a lot quicker this way!

Thanks!

malloc(): invalid size (unsorted)

Hi there! I've been trying to implement cubiomes as a world generator in a server software written in Java.
Everything works fine, but when I start the server, it crashes with the following reason:
malloc(): invalid size (unsorted) Aborted

How do I fix this? Is this a library-related issue?

Regards

Line 897 in layers.c makes no sense

I'm trying to translate it into python just for fun. I should probably be using java so I could make an app about it, but I can do that later. The only reason I like python is that it is easy to understand while you are reading it, which would be good for this for when I try to bring it into other languages. Anyway, line 897 is this:
out[i + j*w] = mcFirstInt(cs, 299999)+2;
it's only run for biomes that aren't the ocean, which doesn't make much sense because this is after the ocean has already been divided into different types of ocean (regular and deep), but that's not the problem.
It looks like it's taking everything that isn't land and replacing it with a pseudo-random number between 0 and 299999, which is way more numbers than biomes that Minecraft has. Is that what it's supposed to be doing?

Also, earlier I noticed something similar happening on line 655 of the same file, which is:
v |= (1 + mcFirstInt(cs, 15)) << 8 & 0xf00;
I had fixed it by changing it to this:
v |= (1 + mcFirstInt(cs, 15)) << (8 & 0xf00);
but that completely changes the meaning of the line because now it will never be bit-shifted.
Just now, I noticed that it fixes itself without my edit after going through the mapBiome function, but it doesn't make sense that the numbers should be bit-shifted to a very large number.

As you can probably tell, I'm not very good at programming in C. Anyway, thanks if you can help!

Proposed changes for more_finders.

I don't know of a better way to make a code suggestion for a fork repository, so I'm making this issue. Here is a branch for more_finders with the API changes applied and I fixed some compiler warnings.

False positives for Outpost generation.

Outpost generation is more complex than the library leads you to believe.
There is no special functionality for verifying potential outpost positions (Outposts wont even have the potential to spawn inside a region if there is no potential village within a (10 chunk?) distance from the outpost).
There is no special functionality to then validate the potential outpost generation (The potential villages within 10 chunks all need to fail their generation).

[Feature Request] GPU usage

I think that the GPU might be able to speed this up by a lot. I'm working to see if I can do it myself, but I'm probably not skilled enough.

Help

Hey there im not sure if this is for here but ide like to ask how do i start up and use the quad witch searcher because everything i download is some files and im couldnt find anything here on the thread about wath program i should use to start it up. So if someone can help me i would be grateful.

Windows compatibility issues?

When trying to compile on Windows, there are weird errors. Pretty much the same exact errors happened to another person on the Java edition speedrunning Discord.

Note: We were building my module Pyubiomes, but reading the logs confirms that they are most certainly from Cubiomes. Everything works perfectly on Linux.

I think I was able to pin down one of the problems. The code uses __attribute__, which is GNU-only. This could be fixed with this macro in the headers:

#ifndef __GNUC__
#  define  __attribute__(x)
#endif

Here are my error logs before attempting to fix the problem myself by adding the macro above

  ERROR: Command errored out with exit status 1:
   command: 'c:\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"'; __file__='"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Zach\AppData\Local\Temp\pip-wheel-kqdrutuk'
       cwd: C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\
  Complete output (131 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\Pyubiomes
  copying Pyubiomes\genconsts.py -> build\lib.win-amd64-3.9\Pyubiomes
  copying Pyubiomes\map.py -> build\lib.win-amd64-3.9\Pyubiomes
  copying Pyubiomes\nether.py -> build\lib.win-amd64-3.9\Pyubiomes
  copying Pyubiomes\__init__.py -> build\lib.win-amd64-3.9\Pyubiomes
  running egg_info
  writing Pyubiomes.egg-info\PKG-INFO
  writing dependency_links to Pyubiomes.egg-info\dependency_links.txt
  writing top-level names to Pyubiomes.egg-info\top_level.txt
  reading manifest file 'Pyubiomes.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'Pyubiomes.egg-info\SOURCES.txt'
  copying Pyubiomes\overworld.c -> build\lib.win-amd64-3.9\Pyubiomes
  copying Pyubiomes\wrap.c -> build\lib.win-amd64-3.9\Pyubiomes
  running build_ext
  building 'Pyubiomes.overworld' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\Pyubiomes
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python\python39\include -Ic:\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tc./Pyubiomes/wrap.c /Fobuild\temp.win-amd64-3.9\Release\./Pyubiomes/wrap.obj
  wrap.c
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(100): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(100): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2146: syntax error: missing ')' before identifier 'invSeed48'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2061: syntax error: identifier 'invSeed48'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(134): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(134): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2146: syntax error: missing ')' before identifier 'mulInv'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2061: syntax error: identifier 'mulInv'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2061: syntax error: identifier '__attribute__'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2059: syntax error: '<cv-qualifer>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(288): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(288): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2146: syntax error: missing ')' before identifier 'getConfig'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2061: syntax error: identifier 'getConfig'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(296): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(296): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2146: syntax error: missing ')' before identifier 'getFeaturePos'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2061: syntax error: identifier 'getFeaturePos'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(299): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(299): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2146: syntax error: missing ')' before identifier 'getFeatureChunkInRegion'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2061: syntax error: identifier 'getFeatureChunkInRegion'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(302): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(302): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2146: syntax error: missing ')' before identifier 'getLargeStructurePos'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2061: syntax error: identifier 'getLargeStructurePos'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(305): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(305): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2146: syntax error: missing ')' before identifier 'getLargeStructureChunkInRegion'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2061: syntax error: identifier 'getLargeStructureChunkInRegion'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2059: syntax error: ';'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2059: syntax error: '<parameter-list>'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(317): error C2143: syntax error: missing ')' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(317): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(318): error C2085: 'isSlimeChunk': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(318): error C2143: syntax error: missing ';' before '{'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(319): error C2065: 'seed': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(320): error C2065: 'chunkX': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(321): error C2065: 'chunkX': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(322): error C2065: 'chunkZ': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(323): error C2065: 'chunkZ': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(326): warning C4047: 'return': 'int (__cdecl *)(const int)' differs in levels of indirection from 'int'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2143: syntax error: missing ')' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2122: 'const int': prototype parameter in name list illegal
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2084: function 'int (__cdecl *__attribute__())(const int)' already has a body
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): note: see previous definition of '__attribute__'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2085: 'isQuadBaseFeature24Classic': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(385): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(385): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2143: syntax error: missing ')' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2122: 'const int': prototype parameter in name list illegal
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2082: redefinition of formal parameter '__attribute__'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2143: syntax error: missing ';' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(387): error C2085: 'isQuadBaseFeature24': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(389): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(389): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2143: syntax error: missing ')' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2122: 'const int': prototype parameter in name list illegal
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2082: redefinition of formal parameter '__attribute__'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2143: syntax error: missing ';' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(391): error C2085: 'isQuadBaseFeature': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(393): error C2143: syntax error: missing ')' before '('
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(393): error C2059: syntax error: ')'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2143: syntax error: missing ')' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2122: 'const int': prototype parameter in name list illegal
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2091: function returns function
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2082: redefinition of formal parameter '__attribute__'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2143: syntax error: missing ';' before 'type'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(395): error C2085: 'isQuadBaseLarge': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(428): error C2085: 'searchAll48': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(445): error C2085: 'getOptimalAfk': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(468): error C2085: 'scanForQuads': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(477): error C2085: 'getBiomeAtPos': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(482): error C2085: 'getShadow': not in formal parameter list
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(482): error C2143: syntax error: missing ';' before '{'
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(483): error C2065: 'seed': undeclared identifier
  C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(483): fatal error C1003: error count exceeds 100; stopping compilation
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for Pyubiomes
  Running setup.py clean for Pyubiomes
Failed to build Pyubiomes
Installing collected packages: Pyubiomes
    Running setup.py install for Pyubiomes ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"'; __file__='"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Zach\AppData\Local\Temp\pip-record-6vlkrmix\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python39\Include\Pyubiomes'
         cwd: C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\
    Complete output (131 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\Pyubiomes
    copying Pyubiomes\genconsts.py -> build\lib.win-amd64-3.9\Pyubiomes
    copying Pyubiomes\map.py -> build\lib.win-amd64-3.9\Pyubiomes
    copying Pyubiomes\nether.py -> build\lib.win-amd64-3.9\Pyubiomes
    copying Pyubiomes\__init__.py -> build\lib.win-amd64-3.9\Pyubiomes
    running egg_info
    writing Pyubiomes.egg-info\PKG-INFO
    writing dependency_links to Pyubiomes.egg-info\dependency_links.txt
    writing top-level names to Pyubiomes.egg-info\top_level.txt
    reading manifest file 'Pyubiomes.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'Pyubiomes.egg-info\SOURCES.txt'
    copying Pyubiomes\overworld.c -> build\lib.win-amd64-3.9\Pyubiomes
    copying Pyubiomes\wrap.c -> build\lib.win-amd64-3.9\Pyubiomes
    running build_ext
    building 'Pyubiomes.overworld' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\Pyubiomes
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python\python39\include -Ic:\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tc./Pyubiomes/wrap.c /Fobuild\temp.win-amd64-3.9\Release\./Pyubiomes/wrap.obj
    wrap.c
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(100): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(100): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2146: syntax error: missing ')' before identifier 'invSeed48'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2061: syntax error: identifier 'invSeed48'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(101): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(134): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(134): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2146: syntax error: missing ')' before identifier 'mulInv'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2061: syntax error: identifier 'mulInv'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\javarnd.h(135): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2061: syntax error: identifier '__attribute__'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\layers.h(382): error C2059: syntax error: '<cv-qualifer>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(288): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(288): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2146: syntax error: missing ')' before identifier 'getConfig'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2061: syntax error: identifier 'getConfig'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(289): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(296): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(296): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2146: syntax error: missing ')' before identifier 'getFeaturePos'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2061: syntax error: identifier 'getFeaturePos'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(297): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(299): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(299): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2146: syntax error: missing ')' before identifier 'getFeatureChunkInRegion'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2061: syntax error: identifier 'getFeatureChunkInRegion'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(300): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(302): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(302): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2146: syntax error: missing ')' before identifier 'getLargeStructurePos'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2061: syntax error: identifier 'getLargeStructurePos'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(303): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(305): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(305): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2146: syntax error: missing ')' before identifier 'getLargeStructureChunkInRegion'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2061: syntax error: identifier 'getLargeStructureChunkInRegion'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2059: syntax error: ';'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(306): error C2059: syntax error: '<parameter-list>'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(317): error C2143: syntax error: missing ')' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(317): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(318): error C2085: 'isSlimeChunk': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(318): error C2143: syntax error: missing ';' before '{'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(319): error C2065: 'seed': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(320): error C2065: 'chunkX': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(321): error C2065: 'chunkX': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(322): error C2065: 'chunkZ': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(323): error C2065: 'chunkZ': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(326): warning C4047: 'return': 'int (__cdecl *)(const int)' differs in levels of indirection from 'int'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2143: syntax error: missing ')' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2122: 'const int': prototype parameter in name list illegal
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(382): error C2084: function 'int (__cdecl *__attribute__())(const int)' already has a body
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(316): note: see previous definition of '__attribute__'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(383): error C2085: 'isQuadBaseFeature24Classic': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(385): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(385): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2143: syntax error: missing ')' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2122: 'const int': prototype parameter in name list illegal
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2082: redefinition of formal parameter '__attribute__'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(386): error C2143: syntax error: missing ';' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(387): error C2085: 'isQuadBaseFeature24': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(389): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(389): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2143: syntax error: missing ')' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2122: 'const int': prototype parameter in name list illegal
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2082: redefinition of formal parameter '__attribute__'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(390): error C2143: syntax error: missing ';' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(391): error C2085: 'isQuadBaseFeature': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(393): error C2143: syntax error: missing ')' before '('
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(393): error C2059: syntax error: ')'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2143: syntax error: missing ')' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2122: 'const int': prototype parameter in name list illegal
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2091: function returns function
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2082: redefinition of formal parameter '__attribute__'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(394): error C2143: syntax error: missing ';' before 'type'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(395): error C2085: 'isQuadBaseLarge': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(428): error C2085: 'searchAll48': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(445): error C2085: 'getOptimalAfk': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(468): error C2085: 'scanForQuads': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(477): error C2085: 'getBiomeAtPos': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(482): error C2085: 'getShadow': not in formal parameter list
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(482): error C2143: syntax error: missing ';' before '{'
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(483): error C2065: 'seed': undeclared identifier
    C:\Users\Zach\AppData\Local\Temp\pip-install-vq06ynqy\pyubiomes_61695e952e6f436990298b64a6df5543\cubiomes\finders.h(483): fatal error C1003: error count exceeds 100; stopping compilation
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"'; __file__='"'"'C:\\Users\\Zach\\AppData\\Local\\Temp\\pip-install-vq06ynqy\\pyubiomes_61695e952e6f436990298b64a6df5543\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Zach\AppData\Local\Temp\pip-record-6vlkrmix\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python39\Include\Pyubiomes' Check the logs for full command output.

Here are my error logs after trying to fix it myself

building 'Pyubiomes.overworld' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\Pyubiomes
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python\Python39\include -IC:\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tc./Pyubiomes/wrap.c /Fobuild\temp.win-amd64-3.9\Release\./Pyubiomes/wrap.obj
wrap.c
C:\Users\Zach\Downloads\pyubiomes-1\cubiomes\finders.h(818): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\cubiomes\finders.h(820): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\cubiomes\finders.h(1071): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(30): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(42): warning C4996: 'fscanf': This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(55): warning C4996: 'fscanf': This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(305): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(306): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(307): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(308): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(395): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(553): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(555): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(711): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(587): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(607): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(654): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(754): warning C4244: 'function': conversion from 'int64_t' to 'const int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(754): warning C4244: 'function': conversion from 'int64_t' to 'const int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(760): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(761): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1611): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1612): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1618): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1619): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1631): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1632): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1647): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1647): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1653): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1654): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1659): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1660): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1699): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1699): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1708): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1708): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1717): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1718): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1729): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1730): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1669): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(1670): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/finders.c(2734): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(16): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(18): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(20): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(22): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(24): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(53): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(74): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(80): error C2143: syntax error: missing ':' before '...'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(580): warning C4305: 'initializing': truncation from 'double' to 'const float'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(582): warning C4305: 'initializing': truncation from 'double' to 'const float'
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(585): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(586): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(661): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(762): warning C4244: 'function': conversion from 'int64_t' to 'double', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(762): warning C4244: 'function': conversion from 'int64_t' to 'double', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(785): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(785): warning C4244: 'function': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/layers.c(2825): warning C4013: '__builtin_bswap32' undefined; assuming extern returning int
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/util.c(276): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\../cubiomes/util.c(280): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(16): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(32): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(117): warning C4244: 'return': conversion from 'int64_t' to 'long', possible loss of data
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(157): error C2057: expected constant expression
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(157): error C2466: cannot allocate an array of constant size 0C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(157): error C2133: 'Strongholds': unknown size
C:\Users\Zach\Downloads\pyubiomes-1\Pyubiomes\overworld.c(204): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
./Pyubiomes/wrap.c(32): error C2057: expected constant expression
./Pyubiomes/wrap.c(32): error C2466: cannot allocate an array of constant size 0
./Pyubiomes/wrap.c(32): error C2133: 'biomes_array': unknown size
./Pyubiomes/wrap.c(86): warning C4244: 'function': conversion from 'int64_t' to 'long', possible loss of data
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

Setting MCver 1.14 returns invalid BiomeID 297 occasionally

testcase: seed 5010, position -3000,-3000.

Amidst for that seed and location shows biome bamboo_jungle (version 1.14), and jungle (version 1.13), which makes sense as bamboo is a variation of jungle.

297-128=169 is bamboo_jungle_hills, so I supposed it's a broken interplay between mapAddBamboo() and mapHills113().

Unfortunately I don't have the expertise to debug this further.

Note that I'm using getBiomeAtPos().

Stronghold location sometimes wildly off in 1.18

Problematic seed: 8606696102824824313

Program reports these strongholds:

Stronghold #1  : (  1884,   1876)
Stronghold #2  : ( -2272,    840)
Stronghold #3  : (   468,  -2172)
Stronghold #4  : ( -3468,   3908)
Stronghold #5  : ( -4784,   -776)
Stronghold #6  : ( -1828,  -5080)
Stronghold #7  : (  3820,  -4216)
Stronghold #8  : (  4692,   1000)
Stronghold #9  : (  1780,   5224)
Stronghold #10 : (  5580,  -6176)
Stronghold #11 : (  8520,  -1836)
Stronghold #12 : (  7224,   3224)

Checking in-game with /locate stronghold we find a stronghold at -1400, 424 (and it is actually there):

image

Chunkbase gets this seed right when put in the experimental 1.18 mode.

Repro program (identical to example in readme, apart from seed):

#include "finders.h"
#include <stdio.h>

int main()
{
    int mc = MC_1_18;
    uint64_t seed = 8606696102824824313LL;

    // Only the first stronghold has a position which can be estimated
    // (+/-112 blocks) without biome check.
    StrongholdIter sh;
    Pos pos = initFirstStronghold(&sh, mc, seed);

    printf("Seed: %" PRId64 "\n", (int64_t) seed);
    printf("Estimated position of first stronghold: (%d, %d)\n", pos.x, pos.z);

    Generator g;
    setupGenerator(&g, mc, 0);
    applySeed(&g, 0, seed);

    pos = getSpawn(&g);
    printf("Spawn: (%d, %d)\n", pos.x, pos.z);

    int i, N = 12;
    for (i = 1; i <= N; i++)
    {
        if (nextStronghold(&sh, &g) <= 0)
            break;
        printf("Stronghold #%-3d: (%6d, %6d)\n", i, sh.pos.x, sh.pos.z);
    }

    return 0;
}

Updating structure code for 1.13

With the big world-gen refactor in 1.13, igloos, jungle temples and witch huts no longer all appear in the same location. The magic number (14357617) is now different for the four "temple" type structures:
Desert temples - 14357617
Igloos - 14357618
Jungle temples - 14357619
Witch huts - 14357620

I can implement the update, but I have a question about the lower 16-bits optimization, since I don't understand it well... Is there some way to derive those values? Should I expect them to change if I update that structure seed value?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.