mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 20:56:45 +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.Logger;
|
||||
import org.bukkit.HeightMap;
|
||||
import org.bukkit.Registry;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.generator.BiomeProvider;
|
||||
@ -48,9 +49,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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;
|
||||
|
||||
static {
|
||||
ArrayList<Biome> biomes = new ArrayList<>(List.of(Biome.values()));
|
||||
biomes.remove(Biome.CUSTOM);
|
||||
BIOMES = List.copyOf(biomes);
|
||||
BIOMES = Arrays.stream(Biome.values())
|
||||
.filter(b -> Registry.BIOME.get(b.getKey()) != null)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user