Skip to content

Commit

Permalink
fix #71 - can't wait for this to come back to bite me
Browse files Browse the repository at this point in the history
  • Loading branch information
valoeghese committed Dec 14, 2021
1 parent 9d42b9f commit e74c2c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public void handleKeybinds() {

if (result.face != null) {
TilePos pos = result.face.apply(result.pos);
TilePos playerPos = player.getTilePos();
TilePos playerPos = player.getNextTilePos();

if (!pos.equals(playerPos) && !pos.equals(playerPos.up())) { // stop player from placing blocks on themself
if (world.isInWorld(pos)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tk/valoeghese/fc0/world/chunk/Chunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public String getLightLevelText(int x, int y, int z) {
int i = index(x, y, z);
byte block = this.blockLighting[i];
byte sky = this.skyLighting[i];
return "Lighting: " + Math.max(this.blockLighting[i], this.skyLighting[i]) + "(block: " + block + ", sky:" + sky + ")";
return "Lighting: " + this.getLightLevel(x, y, z) + " (block: " + block + ", sky:" + sky + ")";
} else {
return "Lighting: N/A (out of world)";
}
Expand Down

0 comments on commit e74c2c3

Please sign in to comment.