From 71913e171d7437b29237d755dabcf2daa55bc91f Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 4 Feb 2019 23:17:22 -0800 Subject: [PATCH] Fixes sea height to match config.yml settings Was 1 block off. https://github.com/BentoBoxWorld/AcidIsland/issues/33 --- src/main/java/world/bentobox/acidisland/AISettings.java | 6 +++--- .../bentobox/acidisland/world/ChunkGeneratorWorld.java | 4 ++-- src/main/resources/config.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/world/bentobox/acidisland/AISettings.java b/src/main/java/world/bentobox/acidisland/AISettings.java index f18b324..84403e3 100644 --- a/src/main/java/world/bentobox/acidisland/AISettings.java +++ b/src/main/java/world/bentobox/acidisland/AISettings.java @@ -149,7 +149,7 @@ public class AISettings implements DataObject, WorldSettings { @ConfigComment("Sea height (don't changes this mid-game unless you delete the world)") @ConfigComment("Minimum is 0, which means you are playing Skyblock!") @ConfigEntry(path = "world.sea-height") - private int seaHeight = 55; + private int seaHeight = 54; @ConfigComment("Maximum number of islands in the world. Set to -1 or 0 for unlimited. ") @ConfigComment("If the number of islands is greater than this number, no new island will be created.") @@ -187,7 +187,7 @@ public class AISettings implements DataObject, WorldSettings { @ConfigComment("Sea height in Nether. Only operates if nether islands is true.") @ConfigComment("Changing mid-game will cause problems!") @ConfigEntry(path = "world.nether.sea-height", needsReset = true) - private int netherSeaHeight = 55; + private int netherSeaHeight = 54; @ConfigComment("Nether trees are made if a player grows a tree in the nether (gravel and glowstone)") @ConfigComment("Applies to both vanilla and islands Nether") @@ -220,7 +220,7 @@ public class AISettings implements DataObject, WorldSettings { @ConfigComment("Sea height in The End. Only operates if end islands is true.") @ConfigComment("Changing mid-game will cause problems!") @ConfigEntry(path = "world.end.sea-height", needsReset = true) - private int endSeaHeight = 55; + private int endSeaHeight = 54; @ConfigEntry(path = "world.end.dragon-spawn", experimental = true) private boolean dragonSpawn = false; diff --git a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java index ccd23e8..68fd06b 100644 --- a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java @@ -44,7 +44,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator { if (world.getEnvironment().equals(Environment.NORMAL)) { biomeGrid.setBiome(x, z, addon.getSettings().getDefaultBiome()); } - for (int y = 0; y < seaHeight; y++) { + for (int y = 0; y <= seaHeight; y++) { result.setBlock(x, y, z, Material.WATER); } } @@ -80,7 +80,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator { if (addon.getSettings().getSeaHeight() != 0) { for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { - for (int y = 0; y < addon.getSettings().getNetherSeaHeight(); y++) { + for (int y = 0; y <= addon.getSettings().getNetherSeaHeight(); y++) { result.setBlock(x, y, z, Material.WATER); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index fb845a6..123eb8b 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -70,7 +70,7 @@ world: use-own-generator: false # Sea height (don't changes this mid-game unless you delete the world) # Minimum is 0, which means you are playing Skyblock! - sea-height: 55 + sea-height: 54 # Maximum number of islands in the world. Set to -1 or 0 for unlimited. # If the number of islands is greater than this number, no new island will be created. max-islands: 0 @@ -94,7 +94,7 @@ world: islands: true # Sea height in Nether. Only operates if nether islands is true. # Changing mid-game will cause problems! - sea-height: 55 + sea-height: 54 # Nether trees are made if a player grows a tree in the nether (gravel and glowstone) # Applies to both vanilla and islands Nether trees: true @@ -115,7 +115,7 @@ world: islands: true # Sea height in The End. Only operates if end islands is true. # Changing mid-game will cause problems! - sea-height: 55 + sea-height: 54 # /!\ This feature is experimental and might not work as expected or might not work at all. dragon-spawn: false # Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps