mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-24 02:55:38 +01:00
Fixed sea height bug. Sea height was not being taken from world settings
This commit is contained in:
parent
f686060e54
commit
77c77f1482
@ -123,7 +123,8 @@ public class CalcIslandLevel {
|
|||||||
|
|
||||||
for (int y = 0; y < island.getCenter().getWorld().getMaxHeight(); y++) {
|
for (int y = 0; y < island.getCenter().getWorld().getMaxHeight(); y++) {
|
||||||
Material blockData = chunk.getBlockType(x, y, z);
|
Material blockData = chunk.getBlockType(x, y, z);
|
||||||
boolean belowSeaLevel = addon.getSettings().getSeaHeight() > 0 && y <= addon.getSettings().getSeaHeight();
|
int seaHeight = addon.getPlugin().getIWM().getSeaHeight(world);
|
||||||
|
boolean belowSeaLevel = seaHeight > 0 && y <= seaHeight;
|
||||||
// Air is free
|
// Air is free
|
||||||
if (!blockData.equals(Material.AIR)) {
|
if (!blockData.equals(Material.AIR)) {
|
||||||
checkBlock(blockData, belowSeaLevel);
|
checkBlock(blockData, belowSeaLevel);
|
||||||
|
@ -13,14 +13,12 @@ import bentobox.addon.level.Level;
|
|||||||
public class Settings {
|
public class Settings {
|
||||||
|
|
||||||
private boolean sumTeamDeaths;
|
private boolean sumTeamDeaths;
|
||||||
private int seaHeight;
|
|
||||||
private Map<Material, Integer> blockLimits = new HashMap<>();
|
private Map<Material, Integer> blockLimits = new HashMap<>();
|
||||||
private Map<Material, Integer> blockValues = new HashMap<>();
|
private Map<Material, Integer> blockValues = new HashMap<>();
|
||||||
private final Map<World, Map<Material, Integer>> worldBlockValues = new HashMap<>();
|
private final Map<World, Map<Material, Integer>> worldBlockValues = new HashMap<>();
|
||||||
private double underWaterMultiplier;
|
private double underWaterMultiplier;
|
||||||
private int deathpenalty;
|
private int deathpenalty;
|
||||||
private long levelCost;
|
private long levelCost;
|
||||||
private Object defaultLanguage;
|
|
||||||
private int levelWait;
|
private int levelWait;
|
||||||
private int maxDeaths;
|
private int maxDeaths;
|
||||||
private boolean islandResetDeathReset;
|
private boolean islandResetDeathReset;
|
||||||
@ -106,18 +104,6 @@ public class Settings {
|
|||||||
private void setSumTeamDeaths(boolean sumTeamDeaths) {
|
private void setSumTeamDeaths(boolean sumTeamDeaths) {
|
||||||
this.sumTeamDeaths = sumTeamDeaths;
|
this.sumTeamDeaths = sumTeamDeaths;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @return the seaHeight
|
|
||||||
*/
|
|
||||||
public final int getSeaHeight() {
|
|
||||||
return seaHeight;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param seaHeight the seaHeight to set
|
|
||||||
*/
|
|
||||||
public final void setSeaHeight(int seaHeight) {
|
|
||||||
this.seaHeight = seaHeight;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @return the blockLimits
|
* @return the blockLimits
|
||||||
*/
|
*/
|
||||||
@ -178,18 +164,6 @@ public class Settings {
|
|||||||
private void setLevelCost(long levelCost) {
|
private void setLevelCost(long levelCost) {
|
||||||
this.levelCost = levelCost;
|
this.levelCost = levelCost;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @return the defaultLanguage
|
|
||||||
*/
|
|
||||||
public final Object getDefaultLanguage() {
|
|
||||||
return defaultLanguage;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param defaultLanguage the defaultLanguage to set
|
|
||||||
*/
|
|
||||||
public final void setDefaultLanguage(Object defaultLanguage) {
|
|
||||||
this.defaultLanguage = defaultLanguage;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @return the levelWait
|
* @return the levelWait
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user