Skip to content

Commit

Permalink
Fixed end gateways for 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubitect committed Jul 21, 2021
1 parent 3899100 commit e61f4f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions finders.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,13 @@ int getStructurePos(int structureType, int mc, uint64_t seed, int regX, int regZ
pos->x = (int)( ((uint32_t)regX << 4) );
pos->z = (int)( ((uint32_t)regZ << 4) );
setSeed(&seed, getPopulationSeed(mc, seed, pos->x, pos->z) + sconf.salt);
if (nextInt(&seed, 700) != 0)
return 0;
if (mc <= MC_1_16) {
if (nextInt(&seed, 700) != 0)
return 0;
} else {
if (nextFloat(&seed) >= 1.0/700)
return 0;
}
pos->x += nextInt(&seed, 16);
pos->z += nextInt(&seed, 16);
return 1;
Expand Down

0 comments on commit e61f4f1

Please sign in to comment.