implement water fog

This commit is contained in:
LabyStudio
2022-02-01 11:06:34 +01:00
parent a3c21b3727
commit cc3da60a6e
9 changed files with 27 additions and 19 deletions
+2 -2
View File
@@ -171,11 +171,11 @@ window.Player = class {
}
isInWater() {
return false;
return this.world.getBlockAt(this.getBlockPosX(), this.getBlockPosY(), this.getBlockPosZ()) === Block.WATER.getId();
}
isHeadInWater() {
return false;
return this.world.getBlockAt(this.getBlockPosX(), Math.floor(this.y + this.getEyeHeight() + 0.12), this.getBlockPosZ()) === Block.WATER.getId();
}
jump() {