From b8bae923ecdd273c41363593da466d62bb798644 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Sun, 26 Oct 2014 20:39:53 +0100 Subject: [PATCH] Prevent stopping depth scanning too early when handling transparent nodes. --- common/renderer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/renderer.go b/common/renderer.go index 29017c9..af8f64f 100644 --- a/common/renderer.go +++ b/common/renderer.go @@ -224,12 +224,13 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) { if currentY < blockY { for y := 15; y >= 0; y-- { if c, ok := db.Content(x, y, z); ok { - currentY = blockY + int32(y) + cY := blockY + int32(y) if colors.IsTransparent(c) { - r.tBuffer[ofs] = r.spans.Insert(r.tBuffer[ofs], currentY, c) + r.tBuffer[ofs] = r.spans.Insert(r.tBuffer[ofs], cY, c) } else { r.cBuffer[ofs] = c + currentY = cY yB[ofs] = currentY break }