diff --git a/common/src/common/dimension/Dimension.java b/common/src/common/dimension/Dimension.java index e5c4b5b..5e63fa8 100755 --- a/common/src/common/dimension/Dimension.java +++ b/common/src/common/dimension/Dimension.java @@ -279,8 +279,7 @@ public abstract class Dimension extends Nameable implements Comparable> 4; BlockArray arr = this.getArray(y); if(arr == null) { @@ -124,7 +128,7 @@ public class Chunk { for(int bz = 0; bz < 16; ++bz) { for(int by = height - 1; by >= height - 5; --by) { if(by >= (height - 1) - rand.zrange(5)) - this.getArray(by >> 4).set(bx, by & 15, bz, ceil); + this.getArray(by >> 4).set(bx, by & 15, bz, Blocks.air.getState()); } } } @@ -132,12 +136,10 @@ public class Chunk { for(int n = 0; n < this.biomes.length; ++n) { this.biomes[n] = (byte)biomes[n].id; } - this.bottom = height == 0 ? Integer.MAX_VALUE : 0; - this.top = height == 0 ? Integer.MIN_VALUE : ((height + 15) >> 4) << 4; - if(ceil == null) - this.genSkyLight(); - else + if(ceil) this.resetRelight(); + else + this.genSkyLight(); } public int getHeight(BlockPos pos) { diff --git a/server/src/server/world/WorldServer.java b/server/src/server/world/WorldServer.java index dd8a4f9..f151139 100755 --- a/server/src/server/world/WorldServer.java +++ b/server/src/server/world/WorldServer.java @@ -163,8 +163,8 @@ public final class WorldServer extends AWorldServer { private BlockReplacer replacer; private FeatureDungeons dungeons; private State liquid; - private State base; - private State ceil; + private boolean base; + private boolean ceil; private FeatureOres[] ores; private FeatureLakes[] lakes; private FeatureLiquids[] liquids; @@ -342,8 +342,8 @@ public final class WorldServer extends AWorldServer { this.caveGen = null; this.bigCaveGen = null; this.ravineGen = null; - this.base = null; - this.ceil = null; + this.base = false; + this.ceil = false; this.mobs = false; this.snow = false; this.strongholdGen = null; @@ -423,8 +423,8 @@ public final class WorldServer extends AWorldServer { this.caveGen = this.createCaveGenerator(); this.bigCaveGen = this.createBigCaveGenerator(); this.ravineGen = this.createRavineGenerator(); - this.base = this.dimension.getFiller().getBlock() == Blocks.air ? null : this.dimension.getFiller(); - this.ceil = this.dimension.getWorldCeiling(); + this.base = this.dimension.getFiller().getBlock() != Blocks.air; + this.ceil = this.dimension.hasWorldCeiling(); this.mobs = this.dimension.hasMobs(); this.snow = this.dimension.hasSnow(); this.strongholdGen = this.dimension.hasStrongholds() ? new MapGenStronghold() : null; @@ -1748,8 +1748,8 @@ public final class WorldServer extends AWorldServer { this.replacer = null; this.populate = false; this.liquid = Blocks.air.getState(); - this.base = null; - this.ceil = null; + this.base = false; + this.ceil = false; this.height = this.generator.getMaximumHeight(); this.seaLevel = this.dimension.getSeaLevel(); this.ores = null;