0

Fix missing dark-oak leaves

This commit is contained in:
Andrew Chin
2013-10-26 14:18:17 -04:00
parent 0306a7040d
commit 63311fbd92
3 changed files with 12 additions and 7 deletions

View File

@@ -26,7 +26,7 @@
// increment this value if you've made a change to the c extesion // increment this value if you've made a change to the c extesion
// and want to force users to rebuild // and want to force users to rebuild
#define OVERVIEWER_EXTENSION_VERSION 44 #define OVERVIEWER_EXTENSION_VERSION 45
/* Python PIL, and numpy headers */ /* Python PIL, and numpy headers */
#include <Python.h> #include <Python.h>

View File

@@ -97,7 +97,7 @@ base_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyObjec
/* water */ /* water */
state->block == 8 || state->block == 9 || state->block == 8 || state->block == 9 ||
/* leaves */ /* leaves */
state->block == 18 || state->block == 18 || state->block == 161 ||
/* tallgrass, but not dead shrubs */ /* tallgrass, but not dead shrubs */
(state->block == 31 && state->block_data != 0) || (state->block == 31 && state->block_data != 0) ||
/* pumpkin/melon stem, not fully grown. Fully grown stems /* pumpkin/melon stem, not fully grown. Fully grown stems
@@ -134,6 +134,7 @@ base_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyObjec
color_table = self->watercolor; color_table = self->watercolor;
break; break;
case 18: case 18:
case 161:
/* leaves */ /* leaves */
color_table = self->foliagecolor; color_table = self->foliagecolor;
if (state->block_data == 2) if (state->block_data == 2)

View File

@@ -1029,18 +1029,22 @@ def wood(self, blockid, data):
elif wood_orientation == 8: # north-south orientation elif wood_orientation == 8: # north-south orientation
return self.build_full_block(side, None, None, side.rotate(270), top) return self.build_full_block(side, None, None, side.rotate(270), top)
@material(blockid=18, data=range(16), transparent=True, solid=True) @material(blockid=[18, 161], data=range(16), transparent=True, solid=True)
def leaves(self, blockid, data): def leaves(self, blockid, data):
# mask out the bits 4 and 8 # mask out the bits 4 and 8
# they are used for player placed and check-for-decay blocks # they are used for player placed and check-for-decay blocks
data = data & 0x3 data = data & 0x3
t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_oak.png") t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_oak.png")
if data == 1: if (blockid, data) == (18, 1): # pine!
# pine!
t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_spruce.png") t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_spruce.png")
elif data == 3: elif (blockid, data) == (18, 2): # birth tree
# jungle tree t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_birch.png")
elif (blockid, data) == (18, 3): # jungle tree
t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_jungle.png") t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_jungle.png")
elif (blockid, data) == (161, 4): # acacia tree
t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_acacia.png")
elif (blockid, data) == (161, 5):
t = self.load_image_texture("assets/minecraft/textures/blocks/leaves_big_oak.png")
return self.build_block(t, t) return self.build_block(t, t)
# sponge # sponge