0

Wood and stripped wood

This commit is contained in:
James Miller
2018-12-15 00:51:27 -08:00
parent be80775bf2
commit 9200278f2f
2 changed files with 60 additions and 2 deletions

View File

@@ -1077,7 +1077,7 @@ block(blockid=15, top_image="assets/minecraft/textures/block/iron_ore.png")
# coal ore # coal ore
block(blockid=16, top_image="assets/minecraft/textures/block/coal_ore.png") block(blockid=16, top_image="assets/minecraft/textures/block/coal_ore.png")
@material(blockid=[17,162,11306,11307], data=range(12), solid=True) @material(blockid=[17,162,11306,11307,11308,11309,11310,11311], data=range(12), solid=True)
def wood(self, blockid, data): def wood(self, blockid, data):
# extract orientation and wood type frorm data bits # extract orientation and wood type frorm data bits
wood_type = data & 3 wood_type = data & 3
@@ -1136,6 +1136,52 @@ def wood(self, blockid, data):
else: else:
top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log_top.png") top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log_top.png")
side = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png") side = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png")
if blockid == 11308: # regular bark:
if wood_type == 0: # normal
top = self.load_image_texture("assets/minecraft/textures/block/oak_log.png")
side = top
if wood_type == 1: # spruce
top = self.load_image_texture("assets/minecraft/textures/block/spruce_log.png")
side = top
if wood_type == 2: # birch
top = self.load_image_texture("assets/minecraft/textures/block/birch_log.png")
side = top
if wood_type == 3: # jungle wood
top = self.load_image_texture("assets/minecraft/textures/block/jungle_log.png")
side = top
elif blockid == 11309: # acacia/dark bark:
if wood_type == 0: # acacia
top = self.load_image_texture("assets/minecraft/textures/block/acacia_log.png")
side = top
elif wood_type == 1: # dark oak
top = self.load_image_texture("assets/minecraft/textures/block/dark_oak_log.png")
side = top
else:
top = self.load_image_texture("assets/minecraft/textures/block/acacia_log.png")
side = top
if blockid == 11310: # stripped regular wood:
if wood_type == 0: # normal
top = self.load_image_texture("assets/minecraft/textures/block/stripped_oak_log.png")
side = top
if wood_type == 1: # spruce
top = self.load_image_texture("assets/minecraft/textures/block/stripped_spruce_log.png")
side = top
if wood_type == 2: # birch
top = self.load_image_texture("assets/minecraft/textures/block/stripped_birch_log.png")
side = top
if wood_type == 3: # jungle wood
top = self.load_image_texture("assets/minecraft/textures/block/stripped_jungle_log.png")
side = top
elif blockid == 11311: # stripped acacia/dark wood:
if wood_type == 0: # acacia
top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png")
side = top
elif wood_type == 1: # dark oak
top = self.load_image_texture("assets/minecraft/textures/block/stripped_dark_oak_log.png")
side = top
else:
top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png")
side = top
# choose orientation and paste textures # choose orientation and paste textures
if wood_orientation == 0: if wood_orientation == 0:

View File

@@ -741,6 +741,18 @@ class RegionSet(object):
'minecraft:stripped_jungle_log': (11306, 3), 'minecraft:stripped_jungle_log': (11306, 3),
'minecraft:stripped_acacia_log': (11307, 0), 'minecraft:stripped_acacia_log': (11307, 0),
'minecraft:stripped_dark_oak_log': (11307, 1), 'minecraft:stripped_dark_oak_log': (11307, 1),
'minecraft:oak_wood': (11308, 0),
'minecraft:spruce_wood': (11308, 1),
'minecraft:birch_wood': (11308, 2),
'minecraft:jungle_wood': (11308, 3),
'minecraft:acacia_wood': (11309, 0),
'minecraft:dark_oak_wood': (11309, 1),
'minecraft:stripped_oak_wood': (11310, 0),
'minecraft:stripped_spruce_wood': (11310, 1),
'minecraft:stripped_birch_wood': (11310, 2),
'minecraft:stripped_jungle_wood': (11310, 3),
'minecraft:stripped_acacia_wood': (11311, 0),
'minecraft:stripped_dark_oak_wood': (11311, 1),
} }
colors = [ 'white', 'orange', 'magenta', 'light_blue', colors = [ 'white', 'orange', 'magenta', 'light_blue',
@@ -813,7 +825,7 @@ class RegionSet(object):
elif key.endswith('shulker_box') or key.endswith('piston') or key in ['minecraft:observer', 'minecraft:dropper', 'minecraft:dispenser']: elif key.endswith('shulker_box') or key.endswith('piston') or key in ['minecraft:observer', 'minecraft:dropper', 'minecraft:dispenser']:
facing = palette_entry['Properties']['facing'] facing = palette_entry['Properties']['facing']
data = {'down': 0, 'up': 1, 'north': 2, 'south': 3, 'west': 4, 'east': 5}[facing] data = {'down': 0, 'up': 1, 'north': 2, 'south': 3, 'west': 4, 'east': 5}[facing]
elif key.endswith('_log'): elif key.endswith('_log') or key.endswith('_wood'):
axis = palette_entry['Properties']['axis'] axis = palette_entry['Properties']['axis']
if axis == 'x': if axis == 'x':
data |= 4 data |= 4