diff --git a/finders.c b/finders.c index d6e0e0c..7b4ecde 100644 --- a/finders.c +++ b/finders.c @@ -170,7 +170,7 @@ int getStructureConfig(int structureType, int mc, StructureConfig *sconf) *sconf = BASTION_CONFIG; return mc >= MC_1_16; case End_Gateway: - *sconf = END_GATEWAY_CONFIG; + *sconf = mc <= MC_1_15 ? END_GATEWAY_CONFIG_115 : END_GATEWAY_CONFIG; return mc >= MC_1_13; default: memset(sconf, 0, sizeof(StructureConfig)); @@ -281,13 +281,12 @@ int getStructurePos(int structureType, int mc, uint64_t seed, int regX, int regZ } else { - seed = getPopulationSeed(mc, seed, pos->x, pos->z); setSeed(&seed, seed + sconf.salt); - if (mc <= MC_1_16) { - if (nextInt(&seed, 700) != 0) + if (mc >= MC_1_17) { + if (nextFloat(&seed) >= 1.0/700) return 0; } else { - if (nextFloat(&seed) >= 1.0/700) + if (nextInt(&seed, 700) != 0) return 0; } pos->x += nextInt(&seed, 16); diff --git a/finders.h b/finders.h index 1289b60..d5beb05 100644 --- a/finders.h +++ b/finders.h @@ -111,6 +111,7 @@ _sc BASTION_CONFIG = { 30084232, 27, 23, Bastion, 0}; _sc END_CITY_CONFIG = { 10387313, 20, 9, End_City, LARGE_STRUCT}; // for the scattered return gateways +_sc END_GATEWAY_CONFIG_115 = { 30000, 1, 1, End_Gateway, CHUNK_STRUCT}; _sc END_GATEWAY_CONFIG = { 40013, 1, 1, End_Gateway, CHUNK_STRUCT}; #undef _sc