Skip to content

Commit

Permalink
Fix bug where structures were not made like Bastions and villages
Browse files Browse the repository at this point in the history
Extended default island distance to 1000 radius to increase chance of
players getting these structures.
  • Loading branch information
tastybento committed Mar 28, 2021
1 parent acd2fc1 commit 48d6850
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
5 changes: 1 addition & 4 deletions src/main/java/world/bentobox/boxed/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@

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;
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public ChunkGenerator getGenerator() {
.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));
Expand All @@ -47,10 +47,10 @@ public ChunkGenerator getNetherGenerator() {
.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));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48d6850

Please sign in to comment.