0

Render the new blocks from the Boo update.

The following are now rendered:
 * Pumpkins
 * Jack-O-Lanterns (look identical to pumpkins at the moment, to match
   the ingame rendering)
 * Bloodstone
 * Slow Sand
 * Lightstone
This commit is contained in:
Andrew Chin
2010-11-02 19:39:22 -04:00
parent d01fb1f520
commit 2c49113bd2

View File

@@ -267,8 +267,8 @@ def _build_blockimages():
36, 37, 80, -1, 65, 4, 25,101, 98, 24, 43, -1, 86, 1, 1, -1, # Torch from above? leaving out fire. Redstone wire? Crops/furnaces handled elsewhere. sign post
# 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
-1, -1, -1, 16, -1, -1, -1, -1, -1, 51, 51, -1, -1, 1, 66, 67, # door,ladder left out. Minecart rail orientation
# 80 81 82 83 84
66, 69, 72, 73, 74 # clay?
# 80 81 82 83 84 85 86 87 88 89 90 91
66, 69, 72, 73, 74, -1,102,103,104,105,-1, 102 # clay?
]
# NOTE: For non-block textures, the sideid is ignored, but can't be -1
@@ -284,8 +284,8 @@ def _build_blockimages():
36, 37, 80, -1, 65, 4, 25,101, 98, 24, 43, -1, 86, 44, 61, -1,
# 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
-1, -1, -1, 16, -1, -1, -1, -1, -1, 51, 51, -1, -1, 1, 66, 67,
# 80 81 82 83 84
66, 69, 72, 73, 74
# 80 81 82 83 84 85 86 87 88 89 90 91
66, 69, 72, 73, 74,-1 ,118,103,104,105, -1, 118
]
# This maps block id to the texture that goes on the side of the block
@@ -392,6 +392,19 @@ def generate_special_texture(blockID, data):
img.paste(side2, (12,6), side2)
img.paste(top, (0,0), top)
return (img.convert("RGB"), img.split()[3])
if blockID in (86,91): # jack-o-lantern
print "generating special for pumpkins"
top = transform_image(terrain_images[102])
side1 = transform_image_side(terrain_images[118])
side2 = transform_image_side(terrain_images[119]).transpose(Image.FLIP_LEFT_RIGHT)
img = Image.new("RGBA", (24,24), (38,92,255,0))
img.paste(side1, (0,6), side1)
img.paste(side2, (12,6), side2)
img.paste(top, (0,0), top)
return (img.convert("RGB"), img.split()[3])
if blockID == 62: # lit furnace
top = transform_image(terrain_images[1])
@@ -489,7 +502,7 @@ def generate_special_texture(blockID, data):
# This set holds block ids that require special pre-computing. These are typically
# things that require ancillary data to render properly (i.e. ladder plus orientation)
special_blocks = set([66,59,61,62, 65,64,71])
special_blocks = set([66,59,61,62, 65,64,71,91,86])
# this is a map of special blockIDs to a list of all
# possible values for ancillary data that it might have.
@@ -501,6 +514,11 @@ special_map[62] = (0,) # burning furnace
special_map[65] = (2,3,4,5) # ladder
special_map[64] = range(16) # wooden door
special_map[71] = range(16) # iron door
special_map[91] = range(5) # jack-o-lantern
special_map[86] = range(5) # pumpkin
# apparently pumpkins and jack-o-lanterns have ancillary data, but it's unknown
# what that data represents. For now, assume that the range for data is 0 to 5
# like torches
specialblockmap = {}