cap chunk height check in worldgen
This commit is contained in:
parent
2dd83c61dc
commit
dfa5026a29
2 changed files with 17 additions and 12 deletions
|
@ -181,8 +181,8 @@ public class Chunk {
|
|||
}
|
||||
|
||||
protected void genHeights() {
|
||||
int top = this.getTopSegment();
|
||||
int bottom = this.getBottomSegment();
|
||||
int top = this.top;
|
||||
int bottom = this.bottom;
|
||||
this.minHeight = Integer.MAX_VALUE;
|
||||
|
||||
for(int x = 0; x < 16; ++x) {
|
||||
|
@ -209,8 +209,8 @@ public class Chunk {
|
|||
}
|
||||
|
||||
public void genSkyLight() {
|
||||
int top = this.getTopSegment();
|
||||
int bottom = this.getBottomSegment();
|
||||
int top = this.top;
|
||||
int bottom = this.bottom;
|
||||
this.minHeight = Integer.MAX_VALUE;
|
||||
|
||||
for(int x = 0; x < 16; ++x) {
|
||||
|
@ -330,7 +330,7 @@ public class Chunk {
|
|||
|
||||
private void relightBlock(int x, int y, int z) {
|
||||
int h = this.height[z << 4 | x];
|
||||
int min = this.getBottomSegment();
|
||||
int min = this.bottom;
|
||||
int cy = h;
|
||||
|
||||
if(y > h) {
|
||||
|
@ -811,8 +811,8 @@ public class Chunk {
|
|||
BlockPos loc = new BlockPos(pos.getX(), this.precHeight[o], pos.getZ());
|
||||
|
||||
if(loc.getY() == -99999999) {
|
||||
int y = this.getTopSegment() + 15;
|
||||
int min = this.getBottomSegment();
|
||||
int y = this.top + 15;
|
||||
int min = this.bottom;
|
||||
loc = new BlockPos(pos.getX(), y, pos.getZ());
|
||||
int h = -1;
|
||||
|
||||
|
@ -1089,8 +1089,8 @@ public class Chunk {
|
|||
}
|
||||
|
||||
private boolean updateColumn(int x, int z) {
|
||||
int top = this.getTopSegment();
|
||||
int bottom = this.getBottomSegment();
|
||||
int top = this.top;
|
||||
int bottom = this.bottom;
|
||||
boolean opaque = false;
|
||||
boolean below = false;
|
||||
BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos((this.xPos << 4) + x, 0, (this.zPos << 4) + z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue