You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: