From 57578eab7aeb20c4df69b053b8f9c5fd4fc2d453 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 9 Dec 2018 02:00:12 -0800 Subject: [PATCH 01/17] Fixing handling of torches/redstone torches on walls --- overviewer_core/world.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 1f58c63..0279d9f 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -775,11 +775,14 @@ class RegionSet(object): data |= 4 elif axis == 'z': data |= 8 - elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch', 'minecraft:wall_torch']: - if palette_entry['Properties']['lit'] == 'true': + elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch','minecraft:wall_torch']: + if key.startswith('minecraft:redstone_') and palette_entry['Properties']['lit'] == 'true': block += 1 - facing = palette_entry['Properties'].get('facing', 'up') - data = {'east': 1, 'west': 2, 'south': 3, 'north': 4, 'up': 5}[facing] + if key.endswith('wall_torch'): + facing = palette_entry['Properties'].get('facing') + data = {'east': 1, 'west': 2, 'south': 3, 'north': 4}[facing] + else: + data = 5 elif key == 'minecraft:vine': p = palette_entry['Properties'] if p['south'] == 'true': data |= 1 From 342a53d67dd52eaadb8fb5cfa83d40f8501b7510 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 9 Dec 2018 03:55:14 -0800 Subject: [PATCH 02/17] Fixes big mushrooms --- overviewer_core/world.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 0279d9f..a90ad2f 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -473,6 +473,7 @@ class RegionSet(object): 'minecraft:infested_chiseled_stone_bricks': (98, 3), 'minecraft:brown_mushroom_block': (99, 0), 'minecraft:red_mushroom_block': (100, 0), + 'minecraft:mushroom_stem': (100,10), 'minecraft:iron_bars': (101, 0), 'minecraft:glass_pane': (102, 0), 'minecraft:attached_pumpkin_stem': (104, 0), @@ -783,6 +784,23 @@ class RegionSet(object): data = {'east': 1, 'west': 2, 'south': 3, 'north': 4}[facing] else: data = 5 + elif key in ['minecraft:brown_mushroom_block','minecraft:red_mushroom_block']: + p = palette_entry['Properties'] + if p['up'] == 'true': data = 5 + else: data = 0 + if p['north'] == 'true': + if p['south'] == 'true': data = 14 + elif p['east'] == 'true': data = 3 + elif p['west'] == 'true': data = 1 + else: data = 2 + elif p['east'] == 'true': + if p['west'] == 'true': data = 14 + elif p['south'] == 'true': data = 9 + else: data = 6 + elif p['south'] == 'true': + if p['west'] == 'true': data = 7 + else: data = 8 + elif p['west'] == 'true': data = 4 elif key == 'minecraft:vine': p = palette_entry['Properties'] if p['south'] == 'true': data |= 1 From 4bea4549709be818f4c86ecc6d7bb189932b51f7 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 9 Dec 2018 04:45:39 -0800 Subject: [PATCH 03/17] Potted plants still not rendering, but I figure this is better than an error message. --- overviewer_core/world.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index a90ad2f..7050cb5 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -519,6 +519,27 @@ class RegionSet(object): 'minecraft:mossy_cobblestone': (139, 16), 'minecraft:cobblestone_wall': (139, 0), 'minecraft:flower_pot': (140, 0), + 'minecraft:potted_poppy': (140, 0), # Pots not rendering + 'minecraft:potted_blue_orchid': (140, 0), + 'minecraft:potted_allium': (140, 0), + 'minecraft:potted_azure_bluet': (140, 0), + 'minecraft:potted_red_tulip': (140, 0), + 'minecraft:potted_orange_tulip': (140, 0), + 'minecraft:potted_white_tulip': (140, 0), + 'minecraft:potted_pink_tulip': (140, 0), + 'minecraft:potted_oxeye_daisy': (140, 0), + 'minecraft:potted_oak_sapling': (140, 0), + 'minecraft:potted_spruce_sapling': (140, 0), + 'minecraft:potted_birch_sapling': (140, 0), + 'minecraft:potted_jungle_sapling': (140, 0), + 'minecraft:potted_acacia_sapling': (140, 0), + 'minecraft:potted_dark_oak_sapling': (140, 0), + 'minecraft:potted_red_mushroom': (140, 0), + 'minecraft:potted_brown_mushroom': (140, 0), + 'minecraft:potted_fern': (140, 0), + 'minecraft:potted_dead_bush': (140, 0), + 'minecraft:potted_cactus': (140, 0), + 'minecraft:potted_bamboo': (140, 0), 'minecraft:carrots': (141, 0), 'minecraft:potatoes': (142, 0), 'minecraft:oak_button': (143, 0), From a80ed53231e6b059164892b679c5deab1b30490d Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 9 Dec 2018 21:30:31 -0800 Subject: [PATCH 04/17] Adding mappings for damaged anvils. Add handling for sign and anvil orientation. --- overviewer_core/world.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 7050cb5..6e759a3 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -427,7 +427,7 @@ class RegionSet(object): 'minecraft:wheat': (59, 0), 'minecraft:farmland': (60, 0), 'minecraft:furnace': (61, 0), - 'minecraft:standing_sign': (63, 0), + 'minecraft:sign': (63, 0), 'minecraft:oak_door': (64, 0), 'minecraft:ladder': (65, 0), # todo: incorporate facing 'minecraft:rail': (66, 0), @@ -549,7 +549,9 @@ class RegionSet(object): 'minecraft:player_wall_head': (144, 3), #not rendering 'minecraft:creeper_wall_head': (144, 4), #not rendering 'minecraft:dragon_wall_head': (144, 5), #not rendering - 'minecraft:anvil': (145, 0), #not rendering + 'minecraft:anvil': (145, 0), + 'minecraft:chipped_anvil': (145, 4), + 'minecraft:damaged_anvil': (145, 8), 'minecraft:trapped_chest': (146, 0), 'minecraft:light_weighted_pressure_plate': (147, 0), 'minecraft:heavy_weighted_pressure_plate': (148, 0), @@ -828,6 +830,20 @@ class RegionSet(object): if p['west'] == 'true': data |= 2 if p['north'] == 'true': data |= 4 if p['east'] == 'true': data |= 8 + elif key.endswith('anvil'): + facing = palette_entry['Properties']['facing'] + if facing == 'west': data += 1 + if facing == 'north': data += 2 + if facing == 'east': data += 3 + elif key == 'minecraft:sign': + p = palette_entry['Properties'] + data = p['rotation'] + elif key == 'minecraft:wall_sign': + facing = palette_entry['Properties']['facing'] + if facing == 'north': data = 2 + elif facing == 'west': data = 4 + elif facing == 'south': data = 3 + elif facing == 'east': data = 5 elif key.endswith('_fence'): p = palette_entry['Properties'] if p['north'] == 'true': data |= 1 From 217a896e2876e3e966f4e6317b4011162b19f936 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 9 Dec 2018 23:35:00 -0800 Subject: [PATCH 05/17] Adds chiseled quartz and quartz pillars --- overviewer_core/world.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 6e759a3..a9a7d70 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -560,8 +560,10 @@ class RegionSet(object): 'minecraft:redstone_block': (152, 0), 'minecraft:nether_quartz_ore': (153, 0), 'minecraft:hopper': (154, 0), - 'minecraft:smooth_quartz': (155, 0), + 'minecraft:smooth_quartz': (155, 0), #How are new textures going to be handled 'minecraft:quartz_block': (155, 0), + 'minecraft:quartz_pillar': (155, 2), + 'minecraft:chiseled_quartz_block': (155, 1), 'minecraft:quartz_stairs': (156, 0), 'minecraft:activator_rail': (157, 0), 'minecraft:dropper': (158, 0), @@ -799,6 +801,12 @@ class RegionSet(object): data |= 4 elif axis == 'z': data |= 8 + elif key == 'minecraft:quartz_pillar': + axis = palette_entry['Properties']['axis'] + if axis == 'z': + data = 3 + if axis == 'x': + data = 4 elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch','minecraft:wall_torch']: if key.startswith('minecraft:redstone_') and palette_entry['Properties']['lit'] == 'true': block += 1 From 39812d84acdf7d15ea1ff0b8ab4591feb8049005 Mon Sep 17 00:00:00 2001 From: James Miller Date: Tue, 11 Dec 2018 20:18:08 -0800 Subject: [PATCH 06/17] Added note blocks, carved pumkin, non-oak pressure plates (oak texture), more infested stone bricks and melons. --- overviewer_core/world.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index a9a7d70..47f894a 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -345,7 +345,7 @@ class RegionSet(object): 'minecraft:sandstone': (24, 0), 'minecraft:cut_sandstone': (24, 2), 'minecraft:chiseled_sandstone': (24, 3), - + 'minecraft:note_block': (25, 0), 'minecraft:white_bed': (26, 0), 'minecraft:orange_bed': (26, 0), 'minecraft:magenta_bed': (26, 0), @@ -429,7 +429,7 @@ class RegionSet(object): 'minecraft:furnace': (61, 0), 'minecraft:sign': (63, 0), 'minecraft:oak_door': (64, 0), - 'minecraft:ladder': (65, 0), # todo: incorporate facing + 'minecraft:ladder': (65, 0), 'minecraft:rail': (66, 0), 'minecraft:stone_stairs': (67, 0), 'minecraft:cobblestone_stairs': (67, 0), @@ -438,6 +438,11 @@ class RegionSet(object): 'minecraft:stone_pressure_plate': (70, 0), 'minecraft:iron_door': (71, 0), 'minecraft:oak_pressure_plate': (72, 0), + 'minecraft:spruce_pressure_plate': (72, 0), #new textures needed + 'minecraft:birch_pressure_plate': (72, 0), + 'minecraft:jungle_pressure_plate': (72, 0), + 'minecraft:acacia_pressure_plate': (72, 0), + 'minecraft:dark_oak_pressure_plate': (72, 0), 'minecraft:redstone_ore': (73, 0), 'minecraft:redstone_wall_torch': (75, 0), 'minecraft:redstone_torch': (75, 5), @@ -451,6 +456,7 @@ class RegionSet(object): 'minecraft:jukebox': (84, 0), 'minecraft:oak_fence': (85, 0), 'minecraft:pumpkin': (86, 0), + 'minecraft:carved_pumpkin': (86, 0), 'minecraft:netherrack': (87, 0), 'minecraft:soul_sand': (88, 0), 'minecraft:glowstone': (89, 0), @@ -468,7 +474,9 @@ class RegionSet(object): 'minecraft:stone_bricks': (98, 0), 'minecraft:infested_stone_bricks': (98, 0), 'minecraft:mossy_stone_bricks': (98, 1), + 'minecraft:infested_mossy_stone_bricks': (98, 1), 'minecraft:cracked_stone_bricks': (98, 2), + 'minecraft:infested_cracked_stone_bricks': (98, 2), 'minecraft:chiseled_stone_bricks': (98, 3), 'minecraft:infested_chiseled_stone_bricks': (98, 3), 'minecraft:brown_mushroom_block': (99, 0), @@ -476,6 +484,7 @@ class RegionSet(object): 'minecraft:mushroom_stem': (100,10), 'minecraft:iron_bars': (101, 0), 'minecraft:glass_pane': (102, 0), + 'minecraft:melon': (103,0), 'minecraft:attached_pumpkin_stem': (104, 0), 'minecraft:attached_melon_stem': (104, 0), 'minecraft:pumpkin_stem': (105, 0), @@ -583,6 +592,7 @@ class RegionSet(object): 'minecraft:green_terracotta': (159, 13), 'minecraft:red_terracotta': (159, 14), 'minecraft:black_terracotta': (159, 15), + # What to do about stripped logs? 'minecraft:acacia_log': (162, 0), 'minecraft:dark_oak_log': (162, 1), 'minecraft:acacia_stairs': (163, 0), @@ -832,6 +842,9 @@ class RegionSet(object): if p['west'] == 'true': data = 7 else: data = 8 elif p['west'] == 'true': data = 4 + elif key in ['minecraft:carved_pumpkin', 'minecraft:jack_o_lantern']: + facing = palette_entry['Properties']['facing'] + data = {'south': 0, 'west': 1, 'north': 2, 'east': 3}[facing] elif key == 'minecraft:vine': p = palette_entry['Properties'] if p['south'] == 'true': data |= 1 From 43122d5dfa16424bc5a25faf2daf8d0fb8405e6b Mon Sep 17 00:00:00 2001 From: James Miller Date: Tue, 11 Dec 2018 23:51:56 -0800 Subject: [PATCH 07/17] Fixing top textures of non-vertically oriented quartz pillars. --- overviewer_core/textures.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index d5b3afb..ab79e92 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -4362,13 +4362,13 @@ def quartz_block(self, blockid, data): return self.build_block(top, side) elif data == 3: # north-south oriented if self.rotation in (0,2): - return self.build_full_block(side, None, None, top, side.rotate(90)) - return self.build_full_block(side.rotate(90), None, None, side.rotate(90), top) + return self.build_full_block(side.rotate(90), None, None, top, side.rotate(90)) + return self.build_full_block(side, None, None, side.rotate(90), top) elif data == 4: # east-west oriented if self.rotation in (0,2): - return self.build_full_block(side.rotate(90), None, None, side.rotate(90), top) - return self.build_full_block(side, None, None, top, side.rotate(90)) + return self.build_full_block(side, None, None, side.rotate(90), top) + return self.build_full_block(side.rotate(90), None, None, top, side.rotate(90)) # hopper @material(blockid=154, data=range(4), transparent=True) @@ -4732,4 +4732,3 @@ def glazed_terracotta(self, blockid, data): return self.build_full_block(texture.rotate(270), None, None, texture.rotate(90), texture.rotate(270)) elif glazed_terracotta_orientation == 3: # east / Player was facing west return self.build_full_block(texture.rotate(180), None, None, texture.rotate(180), texture.rotate(180)) - \ No newline at end of file From b85a954e966dc5832d2c060e26a1a0cd265a4969 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 12 Dec 2018 00:06:49 -0800 Subject: [PATCH 08/17] When adding quartz pillar orientation, I assumed the top orientation was correct, when it was actually the side. see: https://github.com/overviewer/Minecraft-Overviewer/pull/1502 --- overviewer_core/world.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 47f894a..4170bae 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -813,9 +813,9 @@ class RegionSet(object): data |= 8 elif key == 'minecraft:quartz_pillar': axis = palette_entry['Properties']['axis'] - if axis == 'z': - data = 3 if axis == 'x': + data = 3 + if axis == 'z': data = 4 elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch','minecraft:wall_torch']: if key.startswith('minecraft:redstone_') and palette_entry['Properties']['lit'] == 'true': From a99ff9ea372fc7df20ff08ca796969df7feac624 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 12 Dec 2018 00:38:43 -0800 Subject: [PATCH 09/17] Fix light grey terracotta and glazed terracotta orientation. --- overviewer_core/world.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 4170bae..83234fc 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -584,7 +584,7 @@ class RegionSet(object): 'minecraft:lime_terracotta': (159, 5), 'minecraft:pink_terracotta': (159, 6), 'minecraft:gray_terracotta': (159, 7), - 'minecraft:silver_terracotta': (159, 8), + 'minecraft:light_gray_terracotta': (159, 8), 'minecraft:cyan_terracotta': (159, 9), 'minecraft:purple_terracotta': (159, 10), 'minecraft:blue_terracotta': (159, 11), @@ -842,7 +842,7 @@ class RegionSet(object): if p['west'] == 'true': data = 7 else: data = 8 elif p['west'] == 'true': data = 4 - elif key in ['minecraft:carved_pumpkin', 'minecraft:jack_o_lantern']: + elif key in ['minecraft:carved_pumpkin', 'minecraft:jack_o_lantern'] or key.endswith('glazed_terracotta'): facing = palette_entry['Properties']['facing'] data = {'south': 0, 'west': 1, 'north': 2, 'east': 3}[facing] elif key == 'minecraft:vine': From 39c006886d0a7379b4b83e84d91d7594d4bd2b11 Mon Sep 17 00:00:00 2001 From: James Miller Date: Wed, 12 Dec 2018 23:24:00 -0800 Subject: [PATCH 10/17] One more infested block --- overviewer_core/world.py | 1 + 1 file changed, 1 insertion(+) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 83234fc..2e08a48 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -305,6 +305,7 @@ class RegionSet(object): 'minecraft:coarse_dirt': (3, 1), 'minecraft:podzol': (3, 2), 'minecraft:cobblestone': (4, 0), + 'minecraft:infested_cobblestone': (4, 0), 'minecraft:oak_planks': (5, 0), 'minecraft:spruce_planks': (5, 1), 'minecraft:birch_planks': (5, 2), From b282bec2cf63bf440449e7539af48dc7dff0de83 Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 14 Dec 2018 23:08:33 -0800 Subject: [PATCH 11/17] Uncarved pumpkin textures --- overviewer_core/textures.py | 7 +++++-- overviewer_core/world.py | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 3df55e7..69b921c 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -2985,7 +2985,7 @@ def fence(self, blockid, data): return img # pumpkin -@material(blockid=[86, 91], data=range(4), solid=True) +@material(blockid=[86, 91,11300], data=range(4), solid=True) def pumpkin(self, blockid, data): # pumpkins, jack-o-lantern # rotation if self.rotation == 1: @@ -3006,7 +3006,10 @@ def pumpkin(self, blockid, data): # pumpkins, jack-o-lantern # texture generation top = self.load_image_texture("assets/minecraft/textures/block/pumpkin_top.png") - frontName = "assets/minecraft/textures/block/carved_pumpkin.png" if blockid == 86 else "assets/minecraft/textures/block/jack_o_lantern.png" + frontName = {86: "assets/minecraft/textures/block/pumpkin_side.png", + 91: "assets/minecraft/textures/block/jack_o_lantern.png", + 11300: "assets/minecraft/textures/block/carved_pumpkin.png" + }[blockid] front = self.load_image_texture(frontName) side = self.load_image_texture("assets/minecraft/textures/block/pumpkin_side.png") diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 2e08a48..9d5282a 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -457,7 +457,6 @@ class RegionSet(object): 'minecraft:jukebox': (84, 0), 'minecraft:oak_fence': (85, 0), 'minecraft:pumpkin': (86, 0), - 'minecraft:carved_pumpkin': (86, 0), 'minecraft:netherrack': (87, 0), 'minecraft:soul_sand': (88, 0), 'minecraft:glowstone': (89, 0), @@ -734,6 +733,9 @@ class RegionSet(object): 'minecraft:tube_coral_block': (8, 0), 'minecraft:tube_coral_fan': (8, 0), 'minecraft:tube_coral_wall_fan': (8, 0), + + #New blocks + 'minecraft:carved_pumpkin': (11300, 0), } colors = [ 'white', 'orange', 'magenta', 'light_blue', From 446916540a7e54ea05c3627a2cfb1488c312beb7 Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 14 Dec 2018 23:40:21 -0800 Subject: [PATCH 12/17] non-oak pressure plates --- overviewer_core/textures.py | 21 ++++++++++++--------- overviewer_core/world.py | 10 +++++----- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 69b921c..17562ff 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -2692,16 +2692,19 @@ def levers(self, blockid, data): return img # wooden and stone pressure plates, and weighted pressure plates -@material(blockid=[70, 72,147,148], data=[0,1], transparent=True) +@material(blockid=[70, 72,147,148,11301,11302,11303,11304,11305], data=[0,1], transparent=True) def pressure_plate(self, blockid, data): - if blockid == 70: # stone - t = self.load_image_texture("assets/minecraft/textures/block/stone.png").copy() - elif blockid == 72: # wooden - t = self.load_image_texture("assets/minecraft/textures/block/oak_planks.png").copy() - elif blockid == 147: # light golden - t = self.load_image_texture("assets/minecraft/textures/block/gold_block.png").copy() - else: # blockid == 148: # heavy iron - t = self.load_image_texture("assets/minecraft/textures/block/iron_block.png").copy() + texture_name = {70:"assets/minecraft/textures/block/stone.png", # stone + 72:"assets/minecraft/textures/block/oak_planks.png", # oak + 11301:"assets/minecraft/textures/block/spruce_planks.png", # spruce + 11302:"assets/minecraft/textures/block/birch_planks.png", # birch + 11303:"assets/minecraft/textures/block/jungle_planks.png", # jungle + 11304:"assets/minecraft/textures/block/acacia_planks.png", # acacia + 11305:"assets/minecraft/textures/block/dark_oak_planks.png", # dark oak + 147:"assets/minecraft/textures/block/gold_block.png", # light golden + 148:"assets/minecraft/textures/block/iron_block.png", # heavy iron + }[blockid] + t = self.load_image_texture(texture_name).copy() # cut out the outside border, pressure plates are smaller # than a normal block diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 9d5282a..1638c3f 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -439,11 +439,6 @@ class RegionSet(object): 'minecraft:stone_pressure_plate': (70, 0), 'minecraft:iron_door': (71, 0), 'minecraft:oak_pressure_plate': (72, 0), - 'minecraft:spruce_pressure_plate': (72, 0), #new textures needed - 'minecraft:birch_pressure_plate': (72, 0), - 'minecraft:jungle_pressure_plate': (72, 0), - 'minecraft:acacia_pressure_plate': (72, 0), - 'minecraft:dark_oak_pressure_plate': (72, 0), 'minecraft:redstone_ore': (73, 0), 'minecraft:redstone_wall_torch': (75, 0), 'minecraft:redstone_torch': (75, 5), @@ -736,6 +731,11 @@ class RegionSet(object): #New blocks 'minecraft:carved_pumpkin': (11300, 0), + 'minecraft:spruce_pressure_plate': (11301, 0), + 'minecraft:birch_pressure_plate': (11302, 0), + 'minecraft:jungle_pressure_plate': (11303, 0), + 'minecraft:acacia_pressure_plate': (11304, 0), + 'minecraft:dark_oak_pressure_plate': (11305, 0), } colors = [ 'white', 'orange', 'magenta', 'light_blue', From be80775bf2dcc2e6630543f6e15e252f8a696fb9 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sat, 15 Dec 2018 00:14:28 -0800 Subject: [PATCH 13/17] Stripped logs --- overviewer_core/textures.py | 25 ++++++++++++++++++++++++- overviewer_core/world.py | 7 ++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 17562ff..94c58b7 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], data=range(12), solid=True) +@material(blockid=[17,162,11306,11307], data=range(12), solid=True) def wood(self, blockid, data): # extract orientation and wood type frorm data bits wood_type = data & 3 @@ -1113,6 +1113,29 @@ def wood(self, blockid, data): else: top = self.load_image_texture("assets/minecraft/textures/block/acacia_log_top.png") side = self.load_image_texture("assets/minecraft/textures/block/acacia_log.png") + if blockid == 11306: # stripped regular wood: + if wood_type == 0: # normal + top = self.load_image_texture("assets/minecraft/textures/block/stripped_oak_log_top.png") + side = self.load_image_texture("assets/minecraft/textures/block/stripped_oak_log.png") + if wood_type == 1: # spruce + top = self.load_image_texture("assets/minecraft/textures/block/stripped_spruce_log_top.png") + side = self.load_image_texture("assets/minecraft/textures/block/stripped_spruce_log.png") + if wood_type == 2: # birch + top = self.load_image_texture("assets/minecraft/textures/block/stripped_birch_log_top.png") + side = self.load_image_texture("assets/minecraft/textures/block/stripped_birch_log.png") + if wood_type == 3: # jungle wood + top = self.load_image_texture("assets/minecraft/textures/block/stripped_jungle_log_top.png") + side = self.load_image_texture("assets/minecraft/textures/block/stripped_jungle_log.png") + elif blockid == 11307: # stripped acacia/dark wood: + if wood_type == 0: # acacia + 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") + elif wood_type == 1: # dark oak + top = self.load_image_texture("assets/minecraft/textures/block/stripped_dark_oak_log_top.png") + side = self.load_image_texture("assets/minecraft/textures/block/stripped_dark_oak_log.png") + 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") # choose orientation and paste textures if wood_orientation == 0: diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 1638c3f..03e9153 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -587,7 +587,6 @@ class RegionSet(object): 'minecraft:green_terracotta': (159, 13), 'minecraft:red_terracotta': (159, 14), 'minecraft:black_terracotta': (159, 15), - # What to do about stripped logs? 'minecraft:acacia_log': (162, 0), 'minecraft:dark_oak_log': (162, 1), 'minecraft:acacia_stairs': (163, 0), @@ -736,6 +735,12 @@ class RegionSet(object): 'minecraft:jungle_pressure_plate': (11303, 0), 'minecraft:acacia_pressure_plate': (11304, 0), 'minecraft:dark_oak_pressure_plate': (11305, 0), + 'minecraft:stripped_oak_log': (11306, 0), + 'minecraft:stripped_spruce_log': (11306, 1), + 'minecraft:stripped_birch_log': (11306, 2), + 'minecraft:stripped_jungle_log': (11306, 3), + 'minecraft:stripped_acacia_log': (11307, 0), + 'minecraft:stripped_dark_oak_log': (11307, 1), } colors = [ 'white', 'orange', 'magenta', 'light_blue', From 9200278f2f3db09db2817f0fb3a0b574e8732a37 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sat, 15 Dec 2018 00:51:27 -0800 Subject: [PATCH 14/17] 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 From ce78ffe008ae60ac20995dabc95b3efca0903f16 Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 16 Dec 2018 00:44:09 -0800 Subject: [PATCH 15/17] bone block orientation smooth stone blocks coral and dead coral blocks blue ice --- overviewer_core/textures.py | 22 ++++++++++++++++++++++ overviewer_core/world.py | 24 ++++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index c317b79..7e712a7 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -4530,6 +4530,28 @@ block(blockid=173, top_image="assets/minecraft/textures/block/coal_block.png") # packed ice block block(blockid=174, top_image="assets/minecraft/textures/block/packed_ice.png") +#blue ice +block(blockid=11312, top_image="assets/minecraft/textures/block/blue_ice.png") + +#smooth stones +block(blockid=11313, top_image="assets/minecraft/textures/block/stone_slab_top.png") # stone +block(blockid=11314, top_image="assets/minecraft/textures/block/sandstone_top.png") # sandstone +block(blockid=11315, top_image="assets/minecraft/textures/block/red_sandstone_top.png") # red sandstone + +#coral blocks +block(blockid=11316, top_image="assets/minecraft/textures/block/brain_coral_block.png") +block(blockid=11317, top_image="assets/minecraft/textures/block/bubble_coral_block.png") +block(blockid=11318, top_image="assets/minecraft/textures/block/fire_coral_block.png") +block(blockid=11319, top_image="assets/minecraft/textures/block/horn_coral_block.png") +block(blockid=11320, top_image="assets/minecraft/textures/block/tube_coral_block.png") + +#dead coral blocks +block(blockid=11321, top_image="assets/minecraft/textures/block/dead_brain_coral_block.png") +block(blockid=11322, top_image="assets/minecraft/textures/block/dead_bubble_coral_block.png") +block(blockid=11323, top_image="assets/minecraft/textures/block/dead_fire_coral_block.png") +block(blockid=11324, top_image="assets/minecraft/textures/block/dead_horn_coral_block.png") +block(blockid=11325, top_image="assets/minecraft/textures/block/dead_tube_coral_block.png") + @material(blockid=175, data=range(16), transparent=True) def flower(self, blockid, data): double_plant_map = ["sunflower", "lilac", "tall_grass", "large_fern", "rose_bush", "peony", "peony", "peony"] diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 374100c..d5d8814 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -564,8 +564,8 @@ class RegionSet(object): 'minecraft:redstone_block': (152, 0), 'minecraft:nether_quartz_ore': (153, 0), 'minecraft:hopper': (154, 0), - 'minecraft:smooth_quartz': (155, 0), #How are new textures going to be handled 'minecraft:quartz_block': (155, 0), + 'minecraft:smooth_quartz': (155, 0), # Only bottom texture is different 'minecraft:quartz_pillar': (155, 2), 'minecraft:chiseled_quartz_block': (155, 1), 'minecraft:quartz_stairs': (156, 0), @@ -617,7 +617,6 @@ class RegionSet(object): 'minecraft:terracotta': (172, 0), 'minecraft:coal_block': (173, 0), 'minecraft:packed_ice': (174, 0), - 'minecraft:blue_ice': (174, 0), # close enough 'minecraft:sunflower': (175, 0), 'minecraft:lilac': (175, 1), 'minecraft:tall_grass': (175, 2), @@ -702,20 +701,16 @@ class RegionSet(object): # The following blocks are underwater and are not yet rendered. # To avoid spurious warnings, we'll treat them as water for now. 'minecraft:brain_coral': (8, 0), - 'minecraft:brain_coral_block': (8, 0), 'minecraft:brain_coral_fan': (8, 0), 'minecraft:brain_coral_wall_fan': (8, 0), 'minecraft:bubble_column': (8, 0), 'minecraft:bubble_coral': (8, 0), - 'minecraft:bubble_coral_block': (8, 0), 'minecraft:bubble_coral_fan': (8, 0), 'minecraft:bubble_coral_wall_fan': (8, 0), 'minecraft:fire_coral': (8, 0), - 'minecraft:fire_coral_block': (8, 0), 'minecraft:fire_coral_fan': (8, 0), 'minecraft:fire_coral_wall_fan': (8, 0), 'minecraft:horn_coral': (8, 0), - 'minecraft:horn_coral_block': (8, 0), 'minecraft:horn_coral_fan': (8, 0), 'minecraft:horn_coral_wall_fan': (8, 0), 'minecraft:kelp': (8, 0), @@ -724,7 +719,6 @@ class RegionSet(object): 'minecraft:seagrass': (8, 0), 'minecraft:tall_seagrass': (8, 0), 'minecraft:tube_coral': (8, 0), - 'minecraft:tube_coral_block': (8, 0), 'minecraft:tube_coral_fan': (8, 0), 'minecraft:tube_coral_wall_fan': (8, 0), @@ -753,6 +747,20 @@ class RegionSet(object): 'minecraft:stripped_jungle_wood': (11310, 3), 'minecraft:stripped_acacia_wood': (11311, 0), 'minecraft:stripped_dark_oak_wood': (11311, 1), + 'minecraft:blue_ice': (11312, 0), + 'minecraft:smooth_stone': (11313, 0), + 'minecraft:smooth_sandstone': (11314, 0), + 'minecraft:smooth_red_sandstone': (11315, 0), + 'minecraft:brain_coral_block': (11316, 0), + 'minecraft:bubble_coral_block': (11317, 0), + 'minecraft:fire_coral_block': (11318, 0), + 'minecraft:horn_coral_block': (11319, 0), + 'minecraft:tube_coral_block': (11320, 0), + 'minecraft:dead_brain_coral_block': (11321, 0), + 'minecraft:dead_bubble_coral_block': (11322, 0), + 'minecraft:dead_fire_coral_block': (11323, 0), + 'minecraft:dead_horn_coral_block': (11324, 0), + 'minecraft:dead_tube_coral_block': (11325, 0), } colors = [ 'white', 'orange', 'magenta', 'light_blue', @@ -825,7 +833,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') or key.endswith('_wood'): + elif key.endswith('_log') or key.endswith('_wood') or key == 'minecraft:bone_block': axis = palette_entry['Properties']['axis'] if axis == 'x': data |= 4 From 2b2ad76c816f483907438596c8305ae381d513fc Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 16 Dec 2018 03:33:38 -0800 Subject: [PATCH 16/17] non-oak buttons buttons on top of blocks --- overviewer_core/textures.py | 85 ++++++++++++++++++++++++------------- overviewer_core/world.py | 16 ++++++- 2 files changed, 69 insertions(+), 32 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index 7e712a7..c612e7c 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -2802,7 +2802,7 @@ def pressure_plate(self, blockid, data): block(blockid=[73, 74], top_image="assets/minecraft/textures/block/redstone_ore.png") # stone a wood buttons -@material(blockid=(77,143), data=range(16), transparent=True) +@material(blockid=(77,143,11326,11327,11328,11329,11330), data=range(16), transparent=True) def buttons(self, blockid, data): # 0x8 is set if the button is pressed mask this info and render @@ -2814,6 +2814,8 @@ def buttons(self, blockid, data): elif data == 2: data = 4 elif data == 3: data = 2 elif data == 4: data = 1 + elif data == 5: data = 6 + elif data == 6: data = 5 elif self.rotation == 2: if data == 1: data = 2 elif data == 2: data = 1 @@ -2824,11 +2826,18 @@ def buttons(self, blockid, data): elif data == 2: data = 3 elif data == 3: data = 1 elif data == 4: data = 2 + elif data == 5: data = 6 + elif data == 6: data = 5 - if blockid == 77: - t = self.load_image_texture("assets/minecraft/textures/block/stone.png").copy() - else: - t = self.load_image_texture("assets/minecraft/textures/block/oak_planks.png").copy() + texturepath = {77:"assets/minecraft/textures/block/stone.png", + 143:"assets/minecraft/textures/block/oak_planks.png", + 11326:"assets/minecraft/textures/block/spruce_planks.png", + 11327:"assets/minecraft/textures/block/birch_planks.png", + 11328:"assets/minecraft/textures/block/jungle_planks.png", + 11329:"assets/minecraft/textures/block/acacia_planks.png", + 11330:"assets/minecraft/textures/block/dark_oak_planks.png" + }[blockid] + t = self.load_image_texture(texturepath).copy() # generate the texture for the button ImageDraw.Draw(t).rectangle((0,0,15,5),outline=(0,0,0,0),fill=(0,0,0,0)) @@ -2838,38 +2847,54 @@ def buttons(self, blockid, data): img = Image.new("RGBA", (24,24), self.bgcolor) - button = self.transform_image_side(t) - - if data == 1: # facing SOUTH - # buttons can't be placed in transparent blocks, so this - # direction can't be seen - return None + if data < 5: + button = self.transform_image_side(t) + + if data == 1: # facing SOUTH + # buttons can't be placed in transparent blocks, so this + # direction can't be seen + return None + + elif data == 2: # facing NORTH + # paste it twice with different brightness to make a 3D effect + alpha_over(img, button, (12,-1), button) + + alpha = button.split()[3] + button = ImageEnhance.Brightness(button).enhance(0.9) + button.putalpha(alpha) + + alpha_over(img, button, (11,0), button) + + elif data == 3: # facing WEST + # paste it twice with different brightness to make a 3D effect + button = button.transpose(Image.FLIP_LEFT_RIGHT) + alpha_over(img, button, (0,-1), button) + + alpha = button.split()[3] + button = ImageEnhance.Brightness(button).enhance(0.9) + button.putalpha(alpha) + + alpha_over(img, button, (1,0), button) + + elif data == 4: # facing EAST + # buttons can't be placed in transparent blocks, so this + # direction can't be seen + return None + + else: + if data == 5: # long axis east-west + button = self.transform_image_top(t) + else: # long axis north-south + button = self.transform_image_top(t.rotate(90)) - elif data == 2: # facing NORTH # paste it twice with different brightness to make a 3D effect - alpha_over(img, button, (12,-1), button) + alpha_over(img, button, (0,12), button) alpha = button.split()[3] button = ImageEnhance.Brightness(button).enhance(0.9) button.putalpha(alpha) - - alpha_over(img, button, (11,0), button) - elif data == 3: # facing WEST - # paste it twice with different brightness to make a 3D effect - button = button.transpose(Image.FLIP_LEFT_RIGHT) - alpha_over(img, button, (0,-1), button) - - alpha = button.split()[3] - button = ImageEnhance.Brightness(button).enhance(0.9) - button.putalpha(alpha) - - alpha_over(img, button, (1,0), button) - - elif data == 4: # facing EAST - # buttons can't be placed in transparent blocks, so this - # direction can't be seen - return None + alpha_over(img, button, (0,11), button) return img diff --git a/overviewer_core/world.py b/overviewer_core/world.py index d5d8814..e44ca46 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -761,6 +761,11 @@ class RegionSet(object): 'minecraft:dead_fire_coral_block': (11323, 0), 'minecraft:dead_horn_coral_block': (11324, 0), 'minecraft:dead_tube_coral_block': (11325, 0), + 'minecraft:spruce_button': (11326,0), + 'minecraft:birch_button': (11327,0), + 'minecraft:jungle_button': (11328,0), + 'minecraft:acacia_button': (11329,0), + 'minecraft:dark_oak_button': (11330,0), } colors = [ 'white', 'orange', 'magenta', 'light_blue', @@ -825,9 +830,16 @@ class RegionSet(object): elif key in ['minecraft:ladder', 'minecraft:chest', 'minecraft:ender_chest', 'minecraft:trapped_chest', 'minecraft:furnace']: facing = palette_entry['Properties']['facing'] data = {'north': 2, 'south': 3, 'west': 4, 'east': 5}[facing] - elif key in ['minecraft:stone_button', 'minecraft:oak_button']: + elif key.endswith('_button'): facing = palette_entry['Properties']['facing'] - data = {'east': 1, 'west': 2, 'south': 3, 'north': 4}[facing] + face = palette_entry['Properties']['face'] + if face == 'ceiling': + block = 0 + data = 0 + elif face == 'wall': + data = {'east': 1, 'west': 2, 'south': 3, 'north': 4}[facing] + elif face == 'floor': + data = {'east': 6, 'west': 6, 'south': 5, 'north': 5}[facing] elif key == 'minecraft:nether_wart': data = int(palette_entry['Properties']['age']) elif key.endswith('shulker_box') or key.endswith('piston') or key in ['minecraft:observer', 'minecraft:dropper', 'minecraft:dispenser']: From 72c8a1dbd8b944b7cd8b35088f228f9386fbb84f Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 16 Dec 2018 05:17:19 -0800 Subject: [PATCH 17/17] trapdoor orientation non-oak trapdoors dried kelp blocks --- overviewer_core/textures.py | 26 ++++++++++++++++++++------ overviewer_core/world.py | 16 +++++++++++----- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index c612e7c..c1249f1 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -3483,7 +3483,7 @@ def comparator(self, blockid, data): # trapdoor # the trapdoor is looks like a sprite when opened, that's not good -@material(blockid=[96,167], data=range(16), transparent=True, nospawn=True) +@material(blockid=[96,167,11332,11333,11334,11335,11336], data=range(16), transparent=True, nospawn=True) def trapdoor(self, blockid, data): # rotation @@ -3505,11 +3505,19 @@ def trapdoor(self, blockid, data): elif (data & 0b0011) == 3: data = data & 0b1100 | 0 # texture generation - if blockid == 96: - texture = self.load_image_texture("assets/minecraft/textures/block/oak_trapdoor.png") - else: - texture = self.load_image_texture("assets/minecraft/textures/block/iron_trapdoor.png") + texturepath = {96:"assets/minecraft/textures/block/oak_trapdoor.png", + 167:"assets/minecraft/textures/block/iron_trapdoor.png", + 11332:"assets/minecraft/textures/block/spruce_trapdoor.png", + 11333:"assets/minecraft/textures/block/birch_trapdoor.png", + 11334:"assets/minecraft/textures/block/jungle_trapdoor.png", + 11335:"assets/minecraft/textures/block/acacia_trapdoor.png", + 11336:"assets/minecraft/textures/block/dark_oak_trapdoor.png" + }[blockid] + if data & 0x4 == 0x4: # opened trapdoor + if data & 0x08 == 0x08: texture = self.load_image_texture(texturepath).transpose(Image.FLIP_TOP_BOTTOM) + else: texture = self.load_image_texture(texturepath) + if data & 0x3 == 0: # west img = self.build_full_block(None, None, None, None, texture) if data & 0x3 == 1: # east @@ -3518,8 +3526,9 @@ def trapdoor(self, blockid, data): img = self.build_full_block(None, None, texture, None, None) if data & 0x3 == 3: # north img = self.build_full_block(None, None, None, texture, None) - + elif data & 0x4 == 0: # closed trapdoor + texture = self.load_image_texture(texturepath) if data & 0x8 == 0x8: # is a top trapdoor img = Image.new("RGBA", (24,24), self.bgcolor) t = self.build_full_block((texture, 12), None, None, texture, texture) @@ -4850,3 +4859,8 @@ def glazed_terracotta(self, blockid, data): elif glazed_terracotta_orientation == 3: # east / Player was facing west return self.build_full_block(texture.rotate(180), None, None, texture.rotate(180), texture.rotate(180)) +# dried kelp block +@material(blockid=11331, data=[0], solid=True) +def sandstone(self, blockid, data): + top = self.load_image_texture("assets/minecraft/textures/block/dried_kelp_top.png") + return self.build_block(top, self.load_image_texture("assets/minecraft/textures/block/dried_kelp_side.png")) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index e44ca46..ef80195 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -460,11 +460,6 @@ class RegionSet(object): 'minecraft:cake': (92, 0), 'minecraft:repeater': (93,0), 'minecraft:oak_trapdoor': (96, 0), - 'minecraft:spruce_trapdoor': (96, 0), #wrong - 'minecraft:birch_trapdoor': (96, 0), - 'minecraft:jungle_trapdoor': (96, 0), - 'minecraft:acacia_trapdoor': (96, 0), - 'minecraft:dark_oak_trapdoor': (96, 0), 'minecraft:infested_stone': (97, 0), 'minecraft:stone_bricks': (98, 0), 'minecraft:infested_stone_bricks': (98, 0), @@ -766,6 +761,12 @@ class RegionSet(object): 'minecraft:jungle_button': (11328,0), 'minecraft:acacia_button': (11329,0), 'minecraft:dark_oak_button': (11330,0), + 'minecraft:dried_kelp_block': (11331,0), + 'minecraft:spruce_trapdoor': (11332, 0), + 'minecraft:birch_trapdoor': (11333, 0), + 'minecraft:jungle_trapdoor': (11334, 0), + 'minecraft:acacia_trapdoor': (11335, 0), + 'minecraft:dark_oak_trapdoor': (11336, 0), } colors = [ 'white', 'orange', 'magenta', 'light_blue', @@ -927,6 +928,11 @@ class RegionSet(object): 'south': 0x03, 'east': 0x02, }[p['facing']] + elif key.endswith('_trapdoor'): + p = palette_entry['Properties'] + data = {'south': 1, 'north': 0, 'east': 3, 'west': 2}[p['facing']] + if p['open'] == 'true': data |= 0x04 + if p['half'] == 'top': data |= 0x08 return (block, data)