mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Lazy heightmap range fix
This commit is contained in:
parent
9e25c736a0
commit
f7d375c76c
@ -286,7 +286,12 @@ public class HeightMap {
|
|||||||
if (existing.getBlockType().getMaterial().isMovementBlocker()) {
|
if (existing.getBlockType().getMaterial().isMovementBlocker()) {
|
||||||
int y0 = newHeight - 1;
|
int y0 = newHeight - 1;
|
||||||
for (int setY = y0, getY = curHeight - 1; setY >= curHeight; setY--, getY--) {
|
for (int setY = y0, getY = curHeight - 1; setY >= curHeight; setY--, getY--) {
|
||||||
BlockState get = session.getBlock(xr, getY, zr);
|
BlockState get;
|
||||||
|
if (getY >= 0 && getY < 256) {
|
||||||
|
get = session.getBlock(xr, getY, zr);
|
||||||
|
} else {
|
||||||
|
get = BlockTypes.AIR.getDefaultState();
|
||||||
|
}
|
||||||
if (get != BlockTypes.AIR.getDefaultState()) tmpBlock = get;
|
if (get != BlockTypes.AIR.getDefaultState()) tmpBlock = get;
|
||||||
session.setBlock(xr, setY, zr, tmpBlock);
|
session.setBlock(xr, setY, zr, tmpBlock);
|
||||||
++blocksChanged;
|
++blocksChanged;
|
||||||
|
Loading…
Reference in New Issue
Block a user