From 7bbcd40df2429739a51496d861d9d203b67d2bee Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 28 Jan 2022 12:53:49 +0200 Subject: [PATCH] Set default biome to "DRIPSTONE_CAVES" caves in overworld. Change default biome detection with Enums#getIfPresent and use THE_VOID as default biome if presented value does not exist. --- src/main/java/world/bentobox/caveblock/CaveBlock.java | 2 -- src/main/java/world/bentobox/caveblock/Settings.java | 6 +++--- src/main/resources/addon.yml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index 452510b..bd5a261 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -314,6 +314,4 @@ public class CaveBlock extends GameModeAddon * String for the end world. */ private static final String THE_END = "_the_end"; - - } diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index e37d556..5d7e9ee 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -2187,7 +2187,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the overworld") @ConfigEntry(path = "world.default-biome") - private Biome defaultBiome = Biome.PLAINS; + private Biome defaultBiome = Enums.getIfPresent(Biome.class, "DRIPSTONE_CAVES").or(Biome.THE_VOID); @ConfigComment("The maximum number of players a player can ban at any one time in this game mode.") @ConfigComment("The permission caveblock.ban.maxlimit.X where X is a number can also be used per player") @@ -2251,7 +2251,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)") @ConfigEntry(path = "world.nether.biome", since = "1.14.0") - private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER").or(Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.BADLANDS)); + private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.THE_VOID); @ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn") @ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)") @@ -2299,7 +2299,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the end world (this may affect what mobs can spawn)") @ConfigEntry(path = "world.end.biome", since = "1.14.0") - private Biome defaultTheEndBiome = Biome.THE_END; + private Biome defaultTheEndBiome = Enums.getIfPresent(Biome.class, "THE_END").or(Biome.THE_VOID); @ConfigEntry(path = "world.end.dragon-spawn", experimental = true) private boolean dragonSpawn = false; diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 0efbc91..13f8edf 100644 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: CaveBlock main: world.bentobox.caveblock.CaveBlock version: ${version}${build.number} -api-version: 1.13.0 +api-version: 1.19.0 metrics: true repository: "BentoBoxWorld/CaveBlock" icon: "STONE_PICKAXE"