@@ -103,8 +103,8 @@ function tintToGl (tint) {
103
103
return [ r / 255 , g / 255 , b / 255 ]
104
104
}
105
105
106
- function getLiquidRenderHeight ( world : World , block : WorldBlock | null , type : number , pos : Vec3 , isRealWater : boolean ) {
107
- if ( ! isRealWater || ( block && isBlockWaterlogged ( block ) ) ) return 8 / 9
106
+ function getLiquidRenderHeight ( world : World , block : WorldBlock | null , type : number , pos : Vec3 , isWater : boolean , isRealWater : boolean ) {
107
+ if ( ( isWater && ! isRealWater ) || ( block && isBlockWaterlogged ( block ) ) ) return 8 / 9
108
108
if ( ! block || block . type !== type ) return 1 / 9
109
109
if ( block . metadata === 0 ) { // source block
110
110
const blockAbove = world . getBlock ( pos . offset ( 0 , 1 , 0 ) )
@@ -130,7 +130,7 @@ function renderLiquid (world: World, cursor: Vec3, texture: any | undefined, typ
130
130
for ( let z = - 1 ; z <= 1 ; z ++ ) {
131
131
for ( let x = - 1 ; x <= 1 ; x ++ ) {
132
132
const pos = cursor . offset ( x , 0 , z )
133
- heights . push ( getLiquidRenderHeight ( world , world . getBlock ( pos ) , type , pos , isRealWater ) )
133
+ heights . push ( getLiquidRenderHeight ( world , world . getBlock ( pos ) , type , pos , water , isRealWater ) )
134
134
}
135
135
}
136
136
const cornerHeights = [
0 commit comments