From 48d68507315036b2d19f34369bc267922842f247 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 28 Mar 2021 12:56:46 -0700 Subject: [PATCH] Fix bug where structures were not made like Bastions and villages Extended default island distance to 1000 radius to increase chance of players getting these structures. --- src/main/java/world/bentobox/boxed/Settings.java | 5 +---- .../boxed/generators/BoxedBiomeGenerator.java | 11 ++++++----- .../boxed/generators/BoxedChunkGenerator.java | 8 ++++---- src/main/resources/config.yml | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/main/java/world/bentobox/boxed/Settings.java b/src/main/java/world/bentobox/boxed/Settings.java index c47dce4..4674f44 100644 --- a/src/main/java/world/bentobox/boxed/Settings.java +++ b/src/main/java/world/bentobox/boxed/Settings.java @@ -9,11 +9,8 @@ import java.util.Set; import org.bukkit.Difficulty; import org.bukkit.GameMode; -import org.bukkit.block.Biome; import org.bukkit.entity.EntityType; -import com.google.common.base.Enums; - import world.bentobox.bentobox.api.configuration.ConfigComment; import world.bentobox.bentobox.api.configuration.ConfigEntry; import world.bentobox.bentobox.api.configuration.StoreAt; @@ -88,7 +85,7 @@ public class Settings implements WorldSettings { @ConfigComment("Allow strongholds.") @ConfigComment("These will be randomly placed, so may not be available for every player.") @ConfigEntry(path = "world.allow-strongholds", experimental = true, needsRestart = true) - private boolean allowStrongholds = false; + private boolean allowStrongholds = true; @ConfigComment("Spawn limits. These override the limits set in bukkit.yml") @ConfigComment("If set to a negative number, the server defaults will be used") diff --git a/src/main/java/world/bentobox/boxed/generators/BoxedBiomeGenerator.java b/src/main/java/world/bentobox/boxed/generators/BoxedBiomeGenerator.java index b3e9f1b..ca51262 100644 --- a/src/main/java/world/bentobox/boxed/generators/BoxedBiomeGenerator.java +++ b/src/main/java/world/bentobox/boxed/generators/BoxedBiomeGenerator.java @@ -22,8 +22,9 @@ public class BoxedBiomeGenerator implements BiomeGenerator { private static final TreeMap NORTH_EAST = new TreeMap<>(); static { - NORTH_EAST.put(0.2, Biome.PLAINS); - NORTH_EAST.put(0.3, Biome.SAVANNA); + NORTH_EAST.put(0.05, Biome.PLAINS); + NORTH_EAST.put(0.1, Biome.DESERT); + NORTH_EAST.put(0.2, Biome.SAVANNA); NORTH_EAST.put(0.4, Biome.JUNGLE_EDGE); NORTH_EAST.put(0.5, Biome.JUNGLE); NORTH_EAST.put(0.6, Biome.JUNGLE_HILLS); @@ -36,7 +37,7 @@ public class BoxedBiomeGenerator implements BiomeGenerator { } private static final TreeMap SOUTH_EAST = new TreeMap<>(); static { - SOUTH_EAST.put(0.2, Biome.PLAINS); + SOUTH_EAST.put(0.05, Biome.PLAINS); SOUTH_EAST.put(0.3, Biome.SAVANNA); SOUTH_EAST.put(0.4, Biome.DESERT); SOUTH_EAST.put(0.5, Biome.SHATTERED_SAVANNA); @@ -50,7 +51,7 @@ public class BoxedBiomeGenerator implements BiomeGenerator { private static final TreeMap NORTH_WEST = new TreeMap<>(); static { - NORTH_WEST.put(0.2, Biome.PLAINS); + NORTH_WEST.put(0.05, Biome.PLAINS); NORTH_WEST.put(0.25, Biome.SUNFLOWER_PLAINS); NORTH_WEST.put(0.3, Biome.FLOWER_FOREST); NORTH_WEST.put(0.4, Biome.DARK_FOREST); @@ -64,7 +65,7 @@ public class BoxedBiomeGenerator implements BiomeGenerator { private static final TreeMap SOUTH_WEST = new TreeMap<>(); static { - SOUTH_WEST.put(0.2, Biome.PLAINS); + SOUTH_WEST.put(0.05, Biome.PLAINS); SOUTH_WEST.put(0.25, Biome.SWAMP); SOUTH_WEST.put(0.3, Biome.FOREST); SOUTH_WEST.put(0.4, Biome.DARK_FOREST); diff --git a/src/main/java/world/bentobox/boxed/generators/BoxedChunkGenerator.java b/src/main/java/world/bentobox/boxed/generators/BoxedChunkGenerator.java index 6f6b517..6376d61 100644 --- a/src/main/java/world/bentobox/boxed/generators/BoxedChunkGenerator.java +++ b/src/main/java/world/bentobox/boxed/generators/BoxedChunkGenerator.java @@ -31,10 +31,10 @@ public class BoxedChunkGenerator { .createCustomGenerator(wordRef, generator -> { // Set the noise generator generator.setBaseNoiseGenerator(new OverWorldGenerator(addon, addon.getSettings().getSeed())); - if (addon.getSettings().isAllowStructures()) { + if (!addon.getSettings().isAllowStructures()) { generator.getWorldDecorator().withoutDefaultDecorations(DecorationType.SURFACE_STRUCTURES); } - if (addon.getSettings().isAllowStrongholds()) { + if (!addon.getSettings().isAllowStrongholds()) { generator.getWorldDecorator().withoutDefaultDecorations(DecorationType.STRONGHOLDS); } generator.setBiomeGenerator(new BoxedBiomeGenerator(addon)); @@ -47,10 +47,10 @@ public class BoxedChunkGenerator { .createCustomGenerator(wordRefNether, generator -> { // Set the noise generator generator.setBaseNoiseGenerator(new NetherGenerator(addon, addon.getSettings().getSeed())); - if (addon.getSettings().isAllowStructures()) { + if (!addon.getSettings().isAllowStructures()) { generator.getWorldDecorator().withoutDefaultDecorations(DecorationType.SURFACE_STRUCTURES); } - if (addon.getSettings().isAllowStrongholds()) { + if (!addon.getSettings().isAllowStrongholds()) { generator.getWorldDecorator().withoutDefaultDecorations(DecorationType.STRONGHOLDS); } generator.setBiomeGenerator(new NetherBiomeGenerator(addon)); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e71fd33..318a8ec 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -48,7 +48,7 @@ world: # It is the same for every dimension : Overworld, Nether and End. # This value cannot be changed mid-game and the plugin will not start if it is different. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. - area-radius: 400 + area-radius: 1000 # Starting size of boxed spaces. This is a radius so 1 = a 2x2 area. # Admins can adjust via the /boxadmin range set command starting-protection-range: 1