diff --git a/src/main/java/ca/recrown/islandsurvivalcraft/world/BiomeSelector.java b/src/main/java/ca/recrown/islandsurvivalcraft/world/BiomeSelector.java index c2c74f9..10b8abb 100644 --- a/src/main/java/ca/recrown/islandsurvivalcraft/world/BiomeSelector.java +++ b/src/main/java/ca/recrown/islandsurvivalcraft/world/BiomeSelector.java @@ -32,6 +32,10 @@ public class BiomeSelector { temperaturePartitionedOceanBiomes.put(0.5f, new ArrayList<>()); } + public BiomeSelector() { + this(new Random()); + } + public void initialize() { if (initialized) throw new IllegalStateException("Biome selector is already initialized."); diff --git a/src/test/java/ca/recrown/islandsurvivalcraft/world/BiomeSelectorTest.java b/src/test/java/ca/recrown/islandsurvivalcraft/world/BiomeSelectorTest.java index df9c27e..01a8f74 100644 --- a/src/test/java/ca/recrown/islandsurvivalcraft/world/BiomeSelectorTest.java +++ b/src/test/java/ca/recrown/islandsurvivalcraft/world/BiomeSelectorTest.java @@ -2,8 +2,6 @@ package ca.recrown.islandsurvivalcraft.world; import static org.junit.jupiter.api.Assertions.assertEquals; -import java.util.Random; - import org.bukkit.block.Biome; import org.junit.jupiter.api.BeforeAll; @@ -18,7 +16,7 @@ public class BiomeSelectorTest { @BeforeAll public void setUp() { - biomeSelector = new BiomeSelector(new Random()); + biomeSelector = new BiomeSelector(); biomeSelector.initialize(); } diff --git a/src/test/java/ca/recrown/islandsurvivalcraft/world/generation/UniBiomeIslandGeneratorTest.java b/src/test/java/ca/recrown/islandsurvivalcraft/world/generation/UniBiomeIslandGeneratorTest.java index 23dd084..09d4d61 100644 --- a/src/test/java/ca/recrown/islandsurvivalcraft/world/generation/UniBiomeIslandGeneratorTest.java +++ b/src/test/java/ca/recrown/islandsurvivalcraft/world/generation/UniBiomeIslandGeneratorTest.java @@ -50,7 +50,7 @@ public class UniBiomeIslandGeneratorTest { public void generateBiome(int chunkX, int chunkZ) { IslandWorldMapper mapper = new IslandWorldMapper(rand, blockValueCache); TemperatureMapGenerator temperatureMapGenerator = new TemperatureMapGenerator(SEED); - BiomeSelector biomeSelector = new BiomeSelector(rand); + BiomeSelector biomeSelector = new BiomeSelector(); biomeSelector.initialize(); BiomeGenerator biomeGenerator = new UniBiomeIslandGenerator();