Skip to content

Commit

Permalink
Fixed filter
Browse files Browse the repository at this point in the history
  • Loading branch information
hube12 committed Feb 29, 2020
1 parent e7b4691 commit 51db532
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_VERBOSE_MAKEFILE on)
project (witch_hut_finder)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O3")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O3 -static-libgcc")
add_executable(WitchHutFinder layers.h layers.c generator.h generator.c finders.h finders.c main.c)
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ Valid [mcversion] are 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.13.2, 1.14.

Valid [searchRange] (optional) is in blocks, default is 150000 which correspond to -150000 to 150000 on both X and Z.

Valid [filter] (optionale) is either 2, 3 or 4 for respectively only outputting double, triple or quad witch huts as minimum.
Valid [filter] (optional) is either 2, 3 or 4 for respectively only outputting double, triple or quad witch huts as minimum.


# Examples

./WitchHutFinder 1.12 181201211981019340 100000 2
./WitchHutFinder 1.12 181201211981019340 100000 4
./WitchHutFinder 1.14 181201211981019340 100000 2

# TODO

Expand Down
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
usage();
}
}
OFFSET=-OFFSET;
OFFSET=OFFSET-4;
printf("Using seed %ld and version %s\n", seed, versions[mcversion]);
// Basic initialization
StructureConfig featureConfig;
Expand Down Expand Up @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) {
if (euclideanDistance(qhpos[correctPos[i]].x, qhpos[correctPos[i]].z, x, z) > 16384)
valid = 0;
}
if (valid) {
if (valid && maxi==OFFSET+4) {
printf("CENTER for %d huts: %d,%d\n", maxi, x, z);
fprintf(fp, "CENTER for %d huts: %d,%d\n", maxi, x, z);
results[maxi - 2]++;
Expand Down

0 comments on commit 51db532

Please sign in to comment.