diff --git a/pom.xml b/pom.xml index 7613788..b02c206 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,7 @@ world.bentobox bentobox - FC-0.81 + FC-0.9 diff --git a/src/main/java/bentobox/addon/bskyblock/Settings.java b/src/main/java/bentobox/addon/bskyblock/Settings.java index f41ca15..dfe2a6f 100644 --- a/src/main/java/bentobox/addon/bskyblock/Settings.java +++ b/src/main/java/bentobox/addon/bskyblock/Settings.java @@ -11,6 +11,7 @@ import java.util.Set; import org.bukkit.Difficulty; import org.bukkit.GameMode; +import org.bukkit.block.Biome; import org.bukkit.entity.EntityType; import world.bentobox.bentobox.api.addons.Addon; @@ -129,6 +130,10 @@ public class Settings implements DataObject, WorldSettings { @ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR") @ConfigEntry(path = "world.default-game-mode") private GameMode defaultGameMode = GameMode.SURVIVAL; + + @ConfigComment("The default biome for the overworld") + @ConfigEntry(path = "world.default-biome") + private Biome defaultBiome = Biome.PLAINS; // Nether @ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to") @@ -1167,5 +1172,19 @@ public class Settings implements DataObject, WorldSettings { return false; } + /** + * @return default biome + */ + public Biome getDefaultBiome() { + return defaultBiome; + } + + /** + * @param defaultBiome the defaultBiome to set + */ + public void setDefaultBiome(Biome defaultBiome) { + this.defaultBiome = defaultBiome; + } + } \ No newline at end of file diff --git a/src/main/java/bentobox/addon/bskyblock/generators/ChunkGeneratorWorld.java b/src/main/java/bentobox/addon/bskyblock/generators/ChunkGeneratorWorld.java index 2245762..d2edb5e 100644 --- a/src/main/java/bentobox/addon/bskyblock/generators/ChunkGeneratorWorld.java +++ b/src/main/java/bentobox/addon/bskyblock/generators/ChunkGeneratorWorld.java @@ -24,11 +24,11 @@ public class ChunkGeneratorWorld extends ChunkGenerator { PerlinOctaveGenerator gen; /** - * @param plugin - BSkyBlock plugin object + * @param addon - BSkyBlock object */ - public ChunkGeneratorWorld(BSkyBlock plugin) { + public ChunkGeneratorWorld(BSkyBlock addon) { super(); - this.plugin = plugin; + this.plugin = addon; } @Override @@ -40,8 +40,12 @@ public class ChunkGeneratorWorld extends ChunkGenerator { if (plugin.getSettings().getSeaHeight() != 0) { for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { + if (world.getEnvironment().equals(Environment.NORMAL)) { + biomeGrid.setBiome(x, z, plugin.getSettings().getDefaultBiome()); + } for (int y = 0; y < plugin.getSettings().getSeaHeight(); y++) { result.setBlock(x, y, z, Material.WATER); + } } } @@ -50,8 +54,6 @@ public class ChunkGeneratorWorld extends ChunkGenerator { return result; } - // This needs to be set to return true to override minecraft's default - // behavior @Override public boolean canSpawn(World world, int x, int z) { return true; diff --git a/addon.yml b/src/main/resources/addon.yml similarity index 100% rename from addon.yml rename to src/main/resources/addon.yml diff --git a/config.yml b/src/main/resources/config.yml similarity index 100% rename from config.yml rename to src/main/resources/config.yml