make platform biome return singular

This commit is contained in:
dfsek
2021-12-04 18:17:32 -07:00
parent 2ef2b61cc5
commit 0818f943b1
6 changed files with 10 additions and 14 deletions

View File

@@ -21,16 +21,13 @@ public class BukkitBiomeProvider extends BiomeProvider implements Handle {
@Override
public @NotNull org.bukkit.block.Biome getBiome(@NotNull WorldInfo worldInfo, int x, int y, int z) {
Biome biome = delegate.getBiome(x, z, worldInfo.getSeed());
return (org.bukkit.block.Biome) biome.getVanillaBiomes().get(biome.getGenerator().getBiomeNoise(), x, y, z).getHandle();
return (org.bukkit.block.Biome) biome.getPlatformBiome().getHandle();
}
@Override
public @NotNull List<org.bukkit.block.Biome> getBiomes(@NotNull WorldInfo worldInfo) {
return StreamSupport.stream(delegate.getBiomes().spliterator(), false)
.flatMap(terraBiome -> terraBiome.getVanillaBiomes()
.getContents()
.stream()
.map(biome -> (org.bukkit.block.Biome) biome.getHandle()))
.map(terraBiome -> (org.bukkit.block.Biome) terraBiome.getPlatformBiome().getHandle())
.collect(Collectors.toList());
}