From 04d60e90f71f90c8f95f3dc339b06671dc3aa99e Mon Sep 17 00:00:00 2001 From: Scallop Ye <862578730@qq.com> Date: Sat, 21 Jan 2017 11:18:07 +0800 Subject: [PATCH] Fix getBlock --- server/src/main/java/cn/nukkit/level/Level.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/cn/nukkit/level/Level.java b/server/src/main/java/cn/nukkit/level/Level.java index dad731833..938f5880b 100644 --- a/server/src/main/java/cn/nukkit/level/Level.java +++ b/server/src/main/java/cn/nukkit/level/Level.java @@ -1382,8 +1382,8 @@ public Block getBlock(Vector3 pos, boolean cached) { if (cached && (block = this.blockCache.get(index)) != null) { return block; - } else if (pos.y >= 0 && pos.y < 128 && (chunk = this.chunks.get(chunkIndex)) != null) { - fullState = chunk.getFullBlock((int) pos.x & 0x0f, (int) pos.y & 0x7f, + } else if (pos.y >= 0 && pos.y < 256 && (chunk = this.chunks.get(chunkIndex)) != null) { + fullState = chunk.getFullBlock((int) pos.x & 0x0f, (int) pos.y & 0xff, (int) pos.z & 0x0f); } else { fullState = 0;