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

@@ -152,13 +152,19 @@ def _transform_image_side(img, blockID=None):
the right side)"""
if blockID in (44,): # step block
# make the top half transpartent
# make the top half transparent
# (don't just crop img, since we want the size of
# img to be unchanged
mask = img.crop((0,8,16,16))
n = Image.new(img.mode, img.size, (38,92,255,0))
n.paste(mask,(0,0,16,8), mask)
img = n
if blockID in (78,): # snow
# make the top three quarters transparent
mask = img.crop((0,12,16,16))
n = Image.new(img.mode, img.size, (38,92,255,0))
n.paste(mask,(0,12,16,16), mask)
img = n
# Size of the cube side before shear
img = img.resize((12,12))
@@ -220,6 +226,11 @@ def _build_block(top, side, blockID=None):
img.paste(side, (0,12), side)
img.paste(otherside, (12,12), otherside)
img.paste(top, (0,6), top)
elif blockID in (78,): # snow
# shift each texture down 9 pixels
img.paste(side, (0,6), side)
img.paste(otherside, (12,6), otherside)
img.paste(top, (0,9), top)
else:
img.paste(side, (0,6), side)
img.paste(otherside, (12,6), otherside)