Skip to content

Commit

Permalink
refactor: move declaring seed variable down
Browse files Browse the repository at this point in the history
  • Loading branch information
Siroshun09 committed Feb 20, 2024
1 parent eca14e9 commit e1da70b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ public static long generateSeedWithFixedSpawnBiome(@NotNull Key key, int x, int
var biomeSource = NMSUtils.getBiomeSource(NMSUtils.Dimension.OVERWORLD);
var settings = NMSUtils.getNoiseGeneratorSettings(NMSUtils.Dimension.OVERWORLD, large);

long seed;
int attempts = 0;

while (attempts < maxAttempts) {
seed = random.nextLong();
long seed = random.nextLong();

var state = RandomState.create(settings, NMSUtils.getNoiseParameters(), seed);
var spawnBiome = biomeSource.getNoiseBiome(biomeX, biomeY, biomeZ, state.sampler());
Expand Down

0 comments on commit e1da70b

Please sign in to comment.