Added definitions for the new fence gates. Hopefully I got the C side right. Close #1148
This commit is contained in:
@@ -313,7 +313,9 @@ generate_pseudo_data(RenderState *state, unsigned short ancilData) {
|
||||
} else if ((state->block == 85) || (state->block == 188) || (state->block == 189) ||
|
||||
(state->block == 190) || (state->block == 191) || (state->block == 192)) { /* fences */
|
||||
/* check for fences AND fence gates */
|
||||
return check_adjacent_blocks(state, x, y, z, state->block) | check_adjacent_blocks(state, x, y, z, 107);
|
||||
return check_adjacent_blocks(state, x, y, z, state->block) | check_adjacent_blocks(state, x, y, z, 107)
|
||||
| check_adjacent_blocks(state, x, y, z, 183) | check_adjacent_blocks(state, x, y, z, 184) | check_adjacent_blocks(state, x, y, z, 185)
|
||||
| check_adjacent_blocks(state, x, y, z, 186) | check_adjacent_blocks(state, x, y, z, 187);
|
||||
|
||||
} else if (state->block == 55) { /* redstone */
|
||||
/* three addiotional bit are added, one for on/off state, and
|
||||
|
||||
@@ -3590,7 +3590,7 @@ def vines(self, blockid, data):
|
||||
return img
|
||||
|
||||
# fence gates
|
||||
@material(blockid=107, data=range(8), transparent=True, nospawn=True)
|
||||
@material(blockid=[107, 183, 184, 185, 186, 187] data=range(8), transparent=True, nospawn=True)
|
||||
def fence_gate(self, blockid, data):
|
||||
|
||||
# rotation
|
||||
@@ -3617,7 +3617,21 @@ def fence_gate(self, blockid, data):
|
||||
data = data | 0x4
|
||||
|
||||
# create the closed gate side
|
||||
if blockid == 107: # Oak
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_oak.png").copy()
|
||||
elif blockid == 183: # Spruce
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_spruce.png").copy()
|
||||
elif blockid == 184: # Birch
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_birch.png").copy()
|
||||
elif blockid == 185: # Jungle
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_jungle.png").copy()
|
||||
elif blockid == 186: # Dark Oak
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_big_oak.png").copy()
|
||||
elif blockid == 187: # Acacia
|
||||
gate_side = self.load_image_texture("assets/minecraft/textures/blocks/planks_acacia.png").copy()
|
||||
else
|
||||
return None
|
||||
|
||||
gate_side_draw = ImageDraw.Draw(gate_side)
|
||||
gate_side_draw.rectangle((7,0,15,0),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||
gate_side_draw.rectangle((7,4,9,6),outline=(0,0,0,0),fill=(0,0,0,0))
|
||||
|
||||
Reference in New Issue
Block a user