Fixes #985
This commit is contained in:
parent
8e3e5b0d14
commit
eaa8fbfc9d
@ -73,14 +73,14 @@ public class HeightMap {
|
|||||||
int bz = min.getBlockZ();
|
int bz = min.getBlockZ();
|
||||||
Iterable<Vector2D> flat = Regions.asFlatRegion(region).asFlatRegion();
|
Iterable<Vector2D> flat = Regions.asFlatRegion(region).asFlatRegion();
|
||||||
Iterator<Vector2D> iter = new Fast2DIterator(flat, session).iterator();
|
Iterator<Vector2D> iter = new Fast2DIterator(flat, session).iterator();
|
||||||
int y = 0;
|
int layer = 0;
|
||||||
MutableBlockVector mutable = new MutableBlockVector();
|
MutableBlockVector mutable = new MutableBlockVector();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Vector2D pos = iter.next();
|
Vector2D pos = iter.next();
|
||||||
int x = pos.getBlockX();
|
int x = pos.getBlockX();
|
||||||
int z = pos.getBlockZ();
|
int z = pos.getBlockZ();
|
||||||
y = session.getNearestSurfaceLayer(x, z, y, 0, maxY);
|
layer = session.getNearestSurfaceLayer(x, z, (layer + 7) >> 3, 0, maxY);
|
||||||
data[(z - bz) * width + (x - bx)] = y;
|
data[(z - bz) * width + (x - bx)] = layer;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Store current heightmap data
|
// Store current heightmap data
|
||||||
|
Loading…
Reference in New Issue
Block a user