Skip to content

Commit

Permalink
Fix #43 liquid special renderer is scaled incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Dec 23, 2024
1 parent db5ba9e commit e49520f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render/SpecialRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,13 @@ export namespace SpecialRenderers {


export function getBlockMesh(block: BlockState, atlas: TextureAtlasProvider, cull: Cull): Mesh {
const mesh = new Mesh()
if (block.is('water')) {
return liquidRenderer('water', getInt(block, 'level'), atlas, cull, 0)
mesh.merge(liquidRenderer('water', getInt(block, 'level'), atlas, cull, 0))
}
if (block.is('lava')) {
return liquidRenderer('lava', getInt(block, 'level'), atlas, cull)
mesh.merge(liquidRenderer('lava', getInt(block, 'level'), atlas, cull))
}
const mesh = new Mesh()
const chestRenderer = ChestRenderers.get(block.getName().toString())
if (chestRenderer !== undefined) {
const facing = getStr(block, 'facing', 'south')
Expand Down Expand Up @@ -1004,7 +1004,7 @@ export namespace SpecialRenderers {
mesh.merge(wallBannerRenderer(atlas).transform(t))
}

if (block.isWaterlogged()) {
if (!block.is('water') && !block.is('lava') && block.isWaterlogged()) {
mesh.merge(liquidRenderer('water', 0, atlas, cull, 0))
}

Expand Down

0 comments on commit e49520f

Please sign in to comment.