Added nether fences.
This commit is contained in:
@@ -130,7 +130,7 @@ transparent_blocks = set([ 0, 6, 8, 9, 18, 20, 26, 27, 28, 29, 30, 31, 32, 33
|
|||||||
34, 37, 38, 39, 40, 44, 50, 51, 52, 53, 55, 59, 63, 64,
|
34, 37, 38, 39, 40, 44, 50, 51, 52, 53, 55, 59, 63, 64,
|
||||||
65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79,
|
65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79,
|
||||||
81, 83, 85, 90, 92, 93, 94, 96, 101, 102, 104, 105,
|
81, 83, 85, 90, 92, 93, 94, 96, 101, 102, 104, 105,
|
||||||
106, 107, 108, 109])
|
106, 107, 108, 109, 113])
|
||||||
|
|
||||||
# This set holds block ids that are solid blocks
|
# This set holds block ids that are solid blocks
|
||||||
solid_blocks = set([1, 2, 3, 4, 5, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
solid_blocks = set([1, 2, 3, 4, 5, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ generate_pseudo_data(RenderState *state, unsigned char ancilData) {
|
|||||||
* This is a TODO!
|
* This is a TODO!
|
||||||
*/
|
*/
|
||||||
} else if ((state->block == 90) || (state->block == 101) ||
|
} else if ((state->block == 90) || (state->block == 101) ||
|
||||||
(state->block == 102)) {
|
(state->block == 102) || (state->block == 113)) {
|
||||||
return check_adjacent_blocks(state, x, y, z, state->block);
|
return check_adjacent_blocks(state, x, y, z, state->block);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +426,8 @@ chunk_render(PyObject *self, PyObject *args) {
|
|||||||
(state.block == 20) || (state.block == 54) ||
|
(state.block == 20) || (state.block == 54) ||
|
||||||
(state.block == 55) || (state.block == 79) ||
|
(state.block == 55) || (state.block == 79) ||
|
||||||
(state.block == 85) || (state.block == 90) ||
|
(state.block == 85) || (state.block == 90) ||
|
||||||
(state.block == 101) || (state.block == 102)) {
|
(state.block == 101) || (state.block == 102) ||
|
||||||
|
(state.block == 113)) {
|
||||||
ancilData = generate_pseudo_data(&state, ancilData);
|
ancilData = generate_pseudo_data(&state, ancilData);
|
||||||
state.block_pdata = ancilData;
|
state.block_pdata = ancilData;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1434,11 +1434,16 @@ def generate_special_texture(blockID, data):
|
|||||||
|
|
||||||
return generate_texture_tuple(img, blockID)
|
return generate_texture_tuple(img, blockID)
|
||||||
|
|
||||||
if blockID == 85: # fences
|
if blockID == 85 or blockID == 113: # normal fences and nether fences
|
||||||
# create needed images for Big stick fence
|
# create needed images for Big stick fence
|
||||||
|
if blockID == 85: # normal fence
|
||||||
fence_top = terrain_images[4].copy()
|
fence_top = terrain_images[4].copy()
|
||||||
fence_side = terrain_images[4].copy()
|
fence_side = terrain_images[4].copy()
|
||||||
|
fence_small_side = terrain_images[4].copy()
|
||||||
|
else: # netherbrick fence
|
||||||
|
fence_top = terrain_images[224].copy()
|
||||||
|
fence_side = terrain_images[224].copy()
|
||||||
|
fence_small_side = terrain_images[224].copy()
|
||||||
|
|
||||||
# generate the textures of the fence
|
# generate the textures of the fence
|
||||||
ImageDraw.Draw(fence_top).rectangle((0,0,5,15),outline=(0,0,0,0),fill=(0,0,0,0))
|
ImageDraw.Draw(fence_top).rectangle((0,0,5,15),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||||
@@ -1472,9 +1477,6 @@ def generate_special_texture(blockID, data):
|
|||||||
|
|
||||||
# Now render the small sticks.
|
# Now render the small sticks.
|
||||||
# Create needed images
|
# Create needed images
|
||||||
fence_small_side = terrain_images[4].copy()
|
|
||||||
|
|
||||||
# Generate mask
|
|
||||||
ImageDraw.Draw(fence_small_side).rectangle((0,0,15,0),outline=(0,0,0,0),fill=(0,0,0,0))
|
ImageDraw.Draw(fence_small_side).rectangle((0,0,15,0),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||||
ImageDraw.Draw(fence_small_side).rectangle((0,4,15,6),outline=(0,0,0,0),fill=(0,0,0,0))
|
ImageDraw.Draw(fence_small_side).rectangle((0,4,15,6),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||||
ImageDraw.Draw(fence_small_side).rectangle((0,10,15,16),outline=(0,0,0,0),fill=(0,0,0,0))
|
ImageDraw.Draw(fence_small_side).rectangle((0,10,15,16),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||||
@@ -2336,7 +2338,7 @@ special_blocks = set([ 2, 6, 9, 17, 18, 20, 26, 23, 27, 28, 29, 31, 33,
|
|||||||
34, 35, 43, 44, 50, 51, 53, 54, 55, 58, 59, 61, 62,
|
34, 35, 43, 44, 50, 51, 53, 54, 55, 58, 59, 61, 62,
|
||||||
63, 64, 65, 66, 67, 68, 70, 71, 72, 75, 76, 79, 85,
|
63, 64, 65, 66, 67, 68, 70, 71, 72, 75, 76, 79, 85,
|
||||||
86, 90, 91, 92, 93, 94, 96, 98, 99, 100, 101, 102,
|
86, 90, 91, 92, 93, 94, 96, 98, 99, 100, 101, 102,
|
||||||
104, 105, 106, 107, 108, 109])
|
104, 105, 106, 107, 108, 109, 113])
|
||||||
|
|
||||||
# this is a map of special blockIDs to a list of all
|
# this is a map of special blockIDs to a list of all
|
||||||
# possible values for ancillary data that it might have.
|
# possible values for ancillary data that it might have.
|
||||||
@@ -2404,6 +2406,7 @@ special_map[106] = (1,2,4,8) # vine, orientation
|
|||||||
special_map[107] = range(8) # fence gates, orientation + open bit
|
special_map[107] = range(8) # fence gates, orientation + open bit
|
||||||
special_map[108] = range(4) # red stairs, orientation
|
special_map[108] = range(4) # red stairs, orientation
|
||||||
special_map[109] = range(4) # stonebrick stairs, orientation
|
special_map[109] = range(4) # stonebrick stairs, orientation
|
||||||
|
special_map[113] = range(16) # netherbrick fence, uses pseudo data
|
||||||
|
|
||||||
# placeholders that are generated in generate()
|
# placeholders that are generated in generate()
|
||||||
bgcolor = None
|
bgcolor = None
|
||||||
|
|||||||
Reference in New Issue
Block a user