mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-22 18:45:24 +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++) {
|
||||
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
|
||||
if (!blockData.equals(Material.AIR)) {
|
||||
checkBlock(blockData, belowSeaLevel);
|
||||
|
@ -13,14 +13,12 @@ import bentobox.addon.level.Level;
|
||||
public class Settings {
|
||||
|
||||
private boolean sumTeamDeaths;
|
||||
private int seaHeight;
|
||||
private Map<Material, Integer> blockLimits = new HashMap<>();
|
||||
private Map<Material, Integer> blockValues = new HashMap<>();
|
||||
private final Map<World, Map<Material, Integer>> worldBlockValues = new HashMap<>();
|
||||
private double underWaterMultiplier;
|
||||
private int deathpenalty;
|
||||
private long levelCost;
|
||||
private Object defaultLanguage;
|
||||
private int levelWait;
|
||||
private int maxDeaths;
|
||||
private boolean islandResetDeathReset;
|
||||
@ -106,18 +104,6 @@ public class Settings {
|
||||
private void setSumTeamDeaths(boolean 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
|
||||
*/
|
||||
@ -178,18 +164,6 @@ public class Settings {
|
||||
private void setLevelCost(long 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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user