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.
This commit is contained in:
BONNe 2022-01-28 12:53:49 +02:00
parent 18e4694129
commit 7bbcd40df2
3 changed files with 4 additions and 6 deletions

View File

@ -314,6 +314,4 @@ public class CaveBlock extends GameModeAddon
* String for the end world.
*/
private static final String THE_END = "_the_end";
}

View File

@ -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;

View File

@ -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"