Skip to content

Commit

Permalink
Merge pull request #1392 from yescallop/fixgetblock
Browse files Browse the repository at this point in the history
Fix getBlock #blameme
  • Loading branch information
wu-vincent authored Jan 21, 2017
2 parents 35f890d + 04d60e9 commit 1580465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/main/java/cn/nukkit/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1580465

Please sign in to comment.