0

Merge branch 'master' of git://github.com/c99koder/Minecraft-Overviewer

This commit is contained in:
Andrew Brown
2010-10-02 17:47:48 -04:00
3 changed files with 24 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ def get_blockdata_array(level):
# This set holds blocks ids that can be seen through, for occlusion calculations
transparent_blocks = set([0, 6, 8, 9, 18, 20, 37, 38, 39, 40, 44, 50, 51, 52, 53,
59, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 79, 81, 83, 85])
59, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 81, 83, 85])
def render_and_save(chunkfile, cachedir, cave=False):
"""Used as the entry point for the multiprocessing workers (since processes
@@ -337,12 +337,19 @@ class ChunkRenderer(object):
img.paste(t[0], (imgx, imgy), t[1])
# Draw edge lines
if blockid not in transparent_blocks:
if blockid in (44,): # step block
increment = 6
elif blockid in (78,): # snow
increment = 9
else:
increment = 0
if blockid not in transparent_blocks or blockid in (78,): #special case snow so the outline is still drawn
draw = ImageDraw.Draw(img)
if x != 15 and blocks[x+1,y,z] == 0:
draw.line(((imgx+12,imgy), (imgx+22,imgy+5)), fill=(0,0,0), width=1)
draw.line(((imgx+12,imgy+increment), (imgx+22,imgy+5+increment)), fill=(0,0,0), width=1)
if y != 0 and blocks[x,y-1,z] == 0:
draw.line(((imgx,imgy+6), (imgx+12,imgy)), fill=(0,0,0), width=1)
draw.line(((imgx,imgy+6+increment), (imgx+12,imgy+increment)), fill=(0,0,0), width=1)
finally: