Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
@SuppressWarnings("DuplicatedCode")
public class LiquidModelRenderer implements BlockRenderer {
private static final float BLOCK_SCALE = 1f / 16f;
private static final float FACE_INSET = 0.016f; // 0.001 blocks
private static final MatrixM3f FLOWING_UV_SCALE = new MatrixM3f()
.identity()
.translate(-0.5f, -0.5f)
Expand Down Expand Up @@ -280,6 +281,13 @@ private boolean createElementFace(Direction faceDir, VectorM3f c0, VectorM3f c1,
c3.x, c3.y, c3.z
);

// move faces slightly inwards, so they don't z-fight with the faces of waterlogged blocks
blockModel.translate(
faceDirVector.getX() * -FACE_INSET,
faceDirVector.getY() * -FACE_INSET,
faceDirVector.getZ() * -FACE_INSET
);

//UV
uvs[0].set(0, 1);
uvs[1].set(1, 1);
Expand Down
Loading