From b29c9e9ffcb2deb33e2069903cdb923d8293969c Mon Sep 17 00:00:00 2001 From: Joseph Camp Date: Thu, 6 Aug 2020 23:18:07 +0000 Subject: [PATCH 1/2] world: Fix melon/pumpkin/mushroom stem rendering Previous check for warped & crimson stem blocks was too inclusive, causing stems of melons, pumpkins, and mushrooms to be interpreted as air blocks --- overviewer_core/world.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index e1d46a8..70e97ac 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -1053,7 +1053,9 @@ class RegionSet(object): (key == 'minecraft:observer' and p.get('powered', 'false') == 'true')): data |= 0x08 elif (key.endswith('_log') or key.endswith('_wood') or - key == 'minecraft:bone_block' or key.endswith('_stem')): + key in ['minecraft:bone_block', 'minecraft:warped_stem', + 'minecraft:stripped_warped_stem', 'minecraft:crimson_stem', + 'minecraft:stripped_crimson_stem']): axis = palette_entry['Properties']['axis'] if axis == 'x': data |= 4 From a839fa437d254710c5cbd91e62cae52585c24745 Mon Sep 17 00:00:00 2001 From: Joseph Camp Date: Thu, 6 Aug 2020 23:24:12 +0000 Subject: [PATCH 2/2] C: Amend logic in block_class_is_wall() Resolves an issue where this function would mistakenly identify various non-wall blocks as walls --- overviewer_core/src/block_class.c | 2 +- overviewer_core/src/overviewer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/overviewer_core/src/block_class.c b/overviewer_core/src/block_class.c index f895d60..fa9bfce 100644 --- a/overviewer_core/src/block_class.c +++ b/overviewer_core/src/block_class.c @@ -62,7 +62,7 @@ bool block_class_is_wall(mc_block_t block) { mc_block_t mask = 0b11111111; mc_block_t prefix = 0b111 << 8; // 1792 is the starting offset // if the xor zeroes all bits, the prefix must've matched. - return (block & ~mask) ^ prefix == 0; + return ((block & ~mask) ^ prefix) == 0; } const mc_block_t block_class_stair[] = { diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index 4771323..03922cf 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -31,7 +31,7 @@ // increment this value if you've made a change to the c extension // and want to force users to rebuild -#define OVERVIEWER_EXTENSION_VERSION 90 +#define OVERVIEWER_EXTENSION_VERSION 91 #include #include