From 9200278f2f3db09db2817f0fb3a0b574e8732a37 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sat, 15 Dec 2018 00:51:27 -0800 Subject: [PATCH] Wood and stripped wood --- overviewer_core/textures.py | 48 ++++++++++++++++++++++++++++++++++++- overviewer_core/world.py | 14 ++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 94c58b7..c317b79 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -1077,7 +1077,7 @@ block(blockid=15, top_image="assets/minecraft/textures/block/iron_ore.png") # coal ore 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): # extract orientation and wood type frorm data bits wood_type = data & 3 @@ -1136,6 +1136,52 @@ def wood(self, blockid, data): else: 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") + 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 if wood_orientation == 0: diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 03e9153..374100c 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -741,6 +741,18 @@ class RegionSet(object): 'minecraft:stripped_jungle_log': (11306, 3), 'minecraft:stripped_acacia_log': (11307, 0), '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', @@ -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']: facing = palette_entry['Properties']['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'] if axis == 'x': data |= 4