fix prismarine stairs
Sorry for the noise in mc_id.h, but somebody decided they want DOS line endings and I couldn't allow that to happen. When not doing that put the whole thing into diff, I decided to just fix the indentation too while I was at it. Needed bugfixing of some overlooked unsigned char usages for block IDs, as otherwise the lighting would be scuffed. Concerns issue #1486.
This commit is contained in:
@@ -76,7 +76,9 @@ const mc_block_t block_class_stair[] = {
|
||||
block_acacia_stairs,
|
||||
block_dark_oak_stairs,
|
||||
block_red_sandstone_stairs,
|
||||
block_purpur_stairs
|
||||
block_purpur_stairs,
|
||||
block_prismarine_stairs,
|
||||
block_dark_prismarine_stairs
|
||||
};
|
||||
const size_t block_class_stair_len = COUNT_OF(block_class_stair);
|
||||
|
||||
@@ -134,6 +136,8 @@ const mc_block_t block_class_ancil[] = {
|
||||
block_dark_oak_stairs,
|
||||
block_red_sandstone_stairs,
|
||||
block_purpur_stairs,
|
||||
block_prismarine_stairs,
|
||||
block_dark_prismarine_stairs,
|
||||
block_grass,
|
||||
block_flowing_water,
|
||||
block_water,
|
||||
@@ -175,6 +179,8 @@ const mc_block_t block_class_alt_height[] = {
|
||||
block_acacia_stairs,
|
||||
block_dark_oak_stairs,
|
||||
block_red_sandstone_stairs,
|
||||
block_prismarine_stairs,
|
||||
block_dark_prismarine_stairs,
|
||||
block_stone_slab2,
|
||||
block_purpur_stairs,
|
||||
block_purpur_slab,
|
||||
|
||||
@@ -258,6 +258,8 @@ enum mc_block_id
|
||||
block_concrete = 251,
|
||||
block_concrete_powder = 252,
|
||||
block_structure_block = 255,
|
||||
block_prismarine_stairs = 11337,
|
||||
block_dark_prismarine_stairs = 11338
|
||||
};
|
||||
|
||||
typedef uint16_t mc_block_t;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
// increment this value if you've made a change to the c extesion
|
||||
// and want to force users to rebuild
|
||||
#define OVERVIEWER_EXTENSION_VERSION 58
|
||||
#define OVERVIEWER_EXTENSION_VERSION 59
|
||||
|
||||
/* Python PIL, and numpy headers */
|
||||
#include <Python.h>
|
||||
|
||||
@@ -102,7 +102,8 @@ estimate_blocklevel(RenderPrimitiveLighting *self, RenderState *state,
|
||||
int x, int y, int z, int *authoratative) {
|
||||
|
||||
/* placeholders for later data arrays, coordinates */
|
||||
unsigned char block, blocklevel;
|
||||
unsigned short block;
|
||||
unsigned char blocklevel;
|
||||
unsigned int average_count = 0, average_gather = 0, coeff = 0;
|
||||
|
||||
/* defaults to "guess" until told otherwise */
|
||||
@@ -153,7 +154,8 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
|
||||
unsigned char *r, unsigned char *g, unsigned char *b) {
|
||||
|
||||
/* placeholders for later data arrays, coordinates */
|
||||
unsigned char block, skylevel, blocklevel;
|
||||
unsigned short block;
|
||||
unsigned char skylevel, blocklevel;
|
||||
|
||||
block = get_data(state, BLOCKS, x, y, z);
|
||||
skylevel = get_data(state, SKYLIGHT, x, y, z);
|
||||
|
||||
@@ -1866,8 +1866,8 @@ def fire(self, blockid, data):
|
||||
# monster spawner
|
||||
block(blockid=52, top_image="assets/minecraft/textures/block/spawner.png", transparent=True)
|
||||
|
||||
# wooden, cobblestone, red brick, stone brick, netherbrick, sandstone, spruce, birch, jungle, quartz, and red sandstone stairs.
|
||||
@material(blockid=[53,67,108,109,114,128,134,135,136,156,163,164,180,203], data=range(128), transparent=True, solid=True, nospawn=True)
|
||||
# wooden, cobblestone, red brick, stone brick, netherbrick, sandstone, spruce, birch, jungle, quartz, red sandstone and (dark) prismarine stairs.
|
||||
@material(blockid=[53,67,108,109,114,128,134,135,136,156,163,164,180,203,11337,11338], data=range(128), transparent=True, solid=True, nospawn=True)
|
||||
def stairs(self, blockid, data):
|
||||
# preserve the upside-down bit
|
||||
upside_down = data & 0x4
|
||||
@@ -1908,6 +1908,10 @@ def stairs(self, blockid, data):
|
||||
texture = self.load_image_texture("assets/minecraft/textures/block/red_sandstone.png").copy()
|
||||
elif blockid == 203: # purpur stairs
|
||||
texture = self.load_image_texture("assets/minecraft/textures/block/purpur_block.png").copy()
|
||||
elif blockid == 11337: # prismarine stairs
|
||||
texture = self.load_image_texture("assets/minecraft/textures/block/prismarine.png").copy()
|
||||
elif blockid == 11338: # dark prismarine stairs
|
||||
texture = self.load_image_texture("assets/minecraft/textures/block/dark_prismarine.png").copy()
|
||||
|
||||
outside_l = texture.copy()
|
||||
outside_r = texture.copy()
|
||||
|
||||
@@ -772,6 +772,8 @@ class RegionSet(object):
|
||||
'minecraft:acacia_trapdoor': (11335, 0),
|
||||
'minecraft:dark_oak_trapdoor': (11336, 0),
|
||||
'minecraft:petrified_oak_slab': (126, 0),
|
||||
'minecraft:prismarine_stairs': (11337, 0),
|
||||
'minecraft:dark_prismarine_stairs': (11338, 0),
|
||||
}
|
||||
|
||||
colors = [ 'white', 'orange', 'magenta', 'light_blue',
|
||||
|
||||
Reference in New Issue
Block a user