Fixes sea height to match config.yml settings

Was 1 block off.

https://github.com/BentoBoxWorld/AcidIsland/issues/33
This commit is contained in:
tastybento 2019-02-04 23:17:22 -08:00
parent 8ee81763d1
commit 71913e171d
3 changed files with 8 additions and 8 deletions

View File

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

View File

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

View File

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