birch and pine leaves now look different from each other
This commit is contained in:
@@ -210,7 +210,19 @@ rendermode_normal_draw(void *data, RenderState *state, PyObject *src, PyObject *
|
||||
break;
|
||||
case 18:
|
||||
/* leaves */
|
||||
color = PySequence_GetItem(self->foliagecolor, index);
|
||||
if (state->block_data != 2)
|
||||
{
|
||||
/* not birch! */
|
||||
color = PySequence_GetItem(self->foliagecolor, index);
|
||||
} else {
|
||||
/* birch!
|
||||
birch foliage color is flipped XY-ways */
|
||||
unsigned int index_x = 255 - (index % 256);
|
||||
unsigned int index_y = 255 - (index / 256);
|
||||
index = index_y * 256 + index_x;
|
||||
|
||||
color = PySequence_GetItem(self->foliagecolor, index);
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
/* tall grass */
|
||||
|
||||
@@ -617,6 +617,9 @@ def generate_special_texture(blockID, data):
|
||||
|
||||
if blockID == 18: # leaves
|
||||
t = terrain_images[52]
|
||||
if data == 1:
|
||||
# pine!
|
||||
t = terrain_images[132]
|
||||
img = _build_block(t, t, 18)
|
||||
return generate_texture_tuple(img, blockID)
|
||||
|
||||
@@ -2301,7 +2304,7 @@ special_map[2] = range(11) + [0x10,] # grass, grass has not ancildata but is
|
||||
special_map[6] = range(16) # saplings: usual, spruce, birch and future ones (rendered as usual saplings)
|
||||
special_map[9] = range(32) # water: spring,flowing, waterfall, and others (unknown) ancildata values, uses pseudo data
|
||||
special_map[17] = range(3) # wood: normal, birch and pine
|
||||
special_map[18] = range(16) # leaves, birch, normal or pine leaves (not implemented)
|
||||
special_map[18] = range(16) # leaves, birch, normal or pine leaves
|
||||
special_map[20] = range(32) # glass, used to only render the exterior surface, uses pseudo data
|
||||
special_map[26] = range(12) # bed, orientation
|
||||
special_map[23] = range(6) # dispensers, orientation
|
||||
|
||||
Reference in New Issue
Block a user