fix water render issues

This commit is contained in:
LabyStudio
2022-05-05 00:04:07 +02:00
parent d846613ca9
commit a3a4d44386
4 changed files with 30 additions and 20 deletions
@@ -39,7 +39,7 @@ export default class Block {
return 0.0;
}
isTransparent() {
isTranslucent() {
return this.getTransparency() > 0.0;
}
@@ -1,4 +1,5 @@
import Block from "../Block.js";
import EnumBlockFace from "../../../../util/EnumBlockFace.js";
export default class BlockWater extends Block {
@@ -28,7 +29,7 @@ export default class BlockWater extends Block {
shouldRenderFace(world, x, y, z, face) {
let typeId = world.getBlockAtFace(x, y, z, face);
return typeId === 0 || typeId !== this.id && Block.getById(typeId).isTransparent();
return typeId === 0 || typeId !== this.id || typeId !== this.id && face === EnumBlockFace.TOP;
}
getBoundingBox(world, x, y, z) {