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.
This commit is contained in:
tastybento 2021-03-28 12:56:46 -07:00
parent acd2fc1ad3
commit 48d6850731
4 changed files with 12 additions and 14 deletions

View File

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

View File

@ -22,8 +22,9 @@ public class BoxedBiomeGenerator implements BiomeGenerator {
private static final TreeMap<Double, Biome> 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<Double, Biome> 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<Double, Biome> 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<Double, Biome> 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);

View File

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

View File

@ -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 <player> <new range> command
starting-protection-range: 1