From c4883541b3305703b0707530a06a445112c65b5e Mon Sep 17 00:00:00 2001 From: Alejandro Aguilera Date: Fri, 16 Sep 2011 12:52:32 +0200 Subject: [PATCH] Now pumpkin and melon stems are tinted brown in textures.py if they are fully grown. Also delete a save statement. Use state->block_data in rendernormal. --- overviewer_core/src/rendermode-normal.c | 7 ++++--- overviewer_core/textures.py | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/overviewer_core/src/rendermode-normal.c b/overviewer_core/src/rendermode-normal.c index fac8d69..2273f3e 100644 --- a/overviewer_core/src/rendermode-normal.c +++ b/overviewer_core/src/rendermode-normal.c @@ -158,9 +158,10 @@ rendermode_normal_draw(void *data, RenderState *state, PyObject *src, PyObject * /* leaves */ state->block == 18 || /* tallgrass, but not dead shrubs */ - (state->block == 31 && getArrayByte3D(state->blockdata_expanded, state->x, state->y, state->z) != 0) || - /* pumpkin/melon stem */ - ((state->block == 104) || (state->block == 105)) || + (state->block == 31 && state->block_data != 0) || + /* pumpkin/melon stem, not fully grown. Fully grown stems + * get constant brown color (see textures.py) */ + (((state->block == 104) || (state->block == 105)) && (state->block_data != 7)) || /* vines */ state->block == 106) { diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 6f162d9..ee40449 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -1794,7 +1794,11 @@ def generate_special_texture(blockID, data): img = Image.new("RGBA", (16,16), bgcolor) composite.alpha_over(img, t, (0, int(16 - 16*((data + 1)/8.))), t) img = _build_block(img, img, blockID) - img.save("stem-" + str(data) + ".png") + if data & 7 == 7: + # fully grown stem gets brown color! + # there is a conditional in rendermode-normal to not + # tint the data value 7 + img = tintTexture(img, (211,169,116)) return generate_texture_tuple(img, blockID) else: # fully grown, and a pumpking/melon touching it,