Skip to content

Commit 1d40ea7

Browse files
committed
nether: move nether roof blocks into new class
1 parent 0776bf0 commit 1d40ea7

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

overviewer_core/src/block_class.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,15 @@ const mc_block_t block_class_alt_height[] = {
259259
block_purpur_slab,
260260
block_wooden_slab};
261261
const size_t block_class_alt_height_len = COUNT_OF(block_class_alt_height);
262+
263+
const mc_block_t block_class_nether_roof[] = {
264+
block_bedrock,
265+
block_netherrack,
266+
block_quartz_ore,
267+
block_lava,
268+
block_soul_sand,
269+
block_basalt,
270+
block_blackstone,
271+
block_soul_soil,
272+
block_nether_gold_ore};
273+
const size_t block_class_nether_roof_len = COUNT_OF(block_class_nether_roof);

overviewer_core/src/block_class.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ extern const size_t block_class_ancil_len;
4848
extern const mc_block_t block_class_alt_height[];
4949
extern const size_t block_class_alt_height_len;
5050

51+
extern const mc_block_t block_class_nether_roof[];
52+
extern const size_t block_class_nether_roof_len;
53+
5154
#endif

overviewer_core/src/overviewer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
// increment this value if you've made a change to the c extension
3333
// and want to force users to rebuild
34-
#define OVERVIEWER_EXTENSION_VERSION 89
34+
#define OVERVIEWER_EXTENSION_VERSION 90
3535

3636
#include <stdbool.h>
3737
#include <stdint.h>

overviewer_core/src/primitives/nether.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ walk_chunk(RenderState* state, RenderPrimitiveNether* data) {
3737

3838
for (y = NETHER_ROOF - 1; y >= 0; y--) {
3939
blockid = get_data(state, BLOCKS, x, y - (state->chunky * 16), z);
40-
if (block_class_is_subset(blockid, (mc_block_t[]){block_bedrock, block_netherrack,
41-
block_quartz_ore, block_lava, block_soul_sand, block_basalt, block_blackstone,
42-
block_soul_soil, block_nether_gold_ore}, 9))
40+
if (block_class_is_subset(blockid, block_class_nether_roof, block_class_nether_roof_len))
4341
data->remove_block[x + 1][y][z + 1] = true;
4442
else
4543
break;

0 commit comments

Comments
 (0)