mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Wrong biome list for 1.19.4 if datapacks are not enabled (#4016)
* Remove cherry grove for 1.20 below * Handle PR feedback. Replace version check with registry check * Simplify the biomes list * Update Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com> * Handle pr feedback --------- Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
This commit is contained in:
parent
079dc02cfe
commit
db361cc420
@ -37,6 +37,7 @@ import com.sk89q.worldedit.math.BlockVector2;
|
|||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.bukkit.HeightMap;
|
import org.bukkit.HeightMap;
|
||||||
|
import org.bukkit.Registry;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.generator.BiomeProvider;
|
import org.bukkit.generator.BiomeProvider;
|
||||||
@ -48,9 +49,11 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
|
public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
|
||||||
|
|
||||||
@ -434,9 +437,9 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
private static final List<Biome> BIOMES;
|
private static final List<Biome> BIOMES;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ArrayList<Biome> biomes = new ArrayList<>(List.of(Biome.values()));
|
BIOMES = Arrays.stream(Biome.values())
|
||||||
biomes.remove(Biome.CUSTOM);
|
.filter(b -> Registry.BIOME.get(b.getKey()) != null)
|
||||||
BIOMES = List.copyOf(biomes);
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user