Skip to content

Instantly share code, notes, and snippets.

@Pineapplecake
Created September 20, 2020 20:03
Show Gist options
  • Save Pineapplecake/2c9756a7defdda47d9d9762f3a5021ff to your computer and use it in GitHub Desktop.
Save Pineapplecake/2c9756a7defdda47d9d9762f3a5021ff to your computer and use it in GitHub Desktop.
A test of the ocean monument finding capabilities of the cubiomes library. Finds seeds with an ocean monument in region (0,0).
#include <stdio.h>
#include <stdint.h>
#include "finders.h"
int main() {
initBiomes();
LayerStack g;
const int version = MC_1_8;
setupGenerator(&g, version);
int64_t base = 0;
Pos mon = getLargeStructurePos(MONUMENT_CONFIG, base, 0, 0);
for(int64_t upper = 0; upper < 0x100; ++upper) {
int64_t seed = base + (upper << 48);
if(isViableStructurePos(Monument, version, &g, seed, mon.x, mon.z))
printf("%ld\n", seed);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment