Implement new stairs fix stone stairs and slabs
added code change requests by @CounterPillow
This commit is contained in:
@@ -60,7 +60,6 @@ bool block_class_is_subset(
|
|||||||
|
|
||||||
const mc_block_t block_class_stair[] = {
|
const mc_block_t block_class_stair[] = {
|
||||||
block_oak_stairs,
|
block_oak_stairs,
|
||||||
block_stone_stairs,
|
|
||||||
block_brick_stairs,
|
block_brick_stairs,
|
||||||
block_stone_brick_stairs,
|
block_stone_brick_stairs,
|
||||||
block_nether_brick_stairs,
|
block_nether_brick_stairs,
|
||||||
@@ -77,9 +76,19 @@ const mc_block_t block_class_stair[] = {
|
|||||||
block_dark_prismarine_stairs,
|
block_dark_prismarine_stairs,
|
||||||
block_prismarine_brick_stairs,
|
block_prismarine_brick_stairs,
|
||||||
block_mossy_cobblestone_stairs,
|
block_mossy_cobblestone_stairs,
|
||||||
|
block_cobblestone_stairs,
|
||||||
|
block_smooth_quartz_stairs,
|
||||||
|
block_polished_granite_stairs,
|
||||||
|
block_polished_diorite_stairs,
|
||||||
|
block_polished_andesite_stairs,
|
||||||
|
block_stone_stairs,
|
||||||
|
block_granite_stairs,
|
||||||
|
block_diorite_stairs,
|
||||||
|
block_andesite_stairs,
|
||||||
|
block_end_stone_brick_stairs,
|
||||||
|
block_red_nether_brick_stairs,
|
||||||
block_mossy_stone_brick_stairs,
|
block_mossy_stone_brick_stairs,
|
||||||
block_smooth_sandstone_stairs,
|
block_smooth_sandstone_stairs};
|
||||||
};
|
|
||||||
const size_t block_class_stair_len = COUNT_OF(block_class_stair);
|
const size_t block_class_stair_len = COUNT_OF(block_class_stair);
|
||||||
|
|
||||||
const mc_block_t block_class_door[] = {
|
const mc_block_t block_class_door[] = {
|
||||||
@@ -120,7 +129,6 @@ const mc_block_t block_class_ancil[] = {
|
|||||||
block_acacia_door,
|
block_acacia_door,
|
||||||
block_dark_oak_door,
|
block_dark_oak_door,
|
||||||
block_oak_stairs,
|
block_oak_stairs,
|
||||||
block_stone_stairs,
|
|
||||||
block_brick_stairs,
|
block_brick_stairs,
|
||||||
block_stone_brick_stairs,
|
block_stone_brick_stairs,
|
||||||
block_nether_brick_stairs,
|
block_nether_brick_stairs,
|
||||||
@@ -136,8 +144,19 @@ const mc_block_t block_class_ancil[] = {
|
|||||||
block_prismarine_stairs,
|
block_prismarine_stairs,
|
||||||
block_dark_prismarine_stairs,
|
block_dark_prismarine_stairs,
|
||||||
block_prismarine_brick_stairs,
|
block_prismarine_brick_stairs,
|
||||||
|
block_cobblestone_stairs,
|
||||||
block_mossy_cobblestone_stairs,
|
block_mossy_cobblestone_stairs,
|
||||||
block_mossy_stone_brick_stairs,
|
block_mossy_stone_brick_stairs,
|
||||||
|
block_smooth_quartz_stairs,
|
||||||
|
block_polished_granite_stairs,
|
||||||
|
block_polished_diorite_stairs,
|
||||||
|
block_polished_andesite_stairs,
|
||||||
|
block_stone_stairs,
|
||||||
|
block_granite_stairs,
|
||||||
|
block_diorite_stairs,
|
||||||
|
block_andesite_stairs,
|
||||||
|
block_end_stone_brick_stairs,
|
||||||
|
block_red_nether_brick_stairs,
|
||||||
block_smooth_sandstone_stairs,
|
block_smooth_sandstone_stairs,
|
||||||
block_grass,
|
block_grass,
|
||||||
block_flowing_water,
|
block_flowing_water,
|
||||||
@@ -168,7 +187,6 @@ const size_t block_class_ancil_len = COUNT_OF(block_class_ancil);
|
|||||||
const mc_block_t block_class_alt_height[] = {
|
const mc_block_t block_class_alt_height[] = {
|
||||||
block_stone_slab,
|
block_stone_slab,
|
||||||
block_oak_stairs,
|
block_oak_stairs,
|
||||||
block_stone_stairs,
|
|
||||||
block_brick_stairs,
|
block_brick_stairs,
|
||||||
block_stone_brick_stairs,
|
block_stone_brick_stairs,
|
||||||
block_nether_brick_stairs,
|
block_nether_brick_stairs,
|
||||||
@@ -183,8 +201,19 @@ const mc_block_t block_class_alt_height[] = {
|
|||||||
block_prismarine_stairs,
|
block_prismarine_stairs,
|
||||||
block_dark_prismarine_stairs,
|
block_dark_prismarine_stairs,
|
||||||
block_prismarine_brick_stairs,
|
block_prismarine_brick_stairs,
|
||||||
|
block_cobblestone_stairs,
|
||||||
block_mossy_cobblestone_stairs,
|
block_mossy_cobblestone_stairs,
|
||||||
block_mossy_stone_brick_stairs,
|
block_mossy_stone_brick_stairs,
|
||||||
|
block_smooth_quartz_stairs,
|
||||||
|
block_polished_granite_stairs,
|
||||||
|
block_polished_diorite_stairs,
|
||||||
|
block_polished_andesite_stairs,
|
||||||
|
block_stone_stairs,
|
||||||
|
block_granite_stairs,
|
||||||
|
block_diorite_stairs,
|
||||||
|
block_andesite_stairs,
|
||||||
|
block_end_stone_brick_stairs,
|
||||||
|
block_red_nether_brick_stairs,
|
||||||
block_smooth_sandstone_stairs,
|
block_smooth_sandstone_stairs,
|
||||||
block_prismarine_slab,
|
block_prismarine_slab,
|
||||||
block_dark_prismarine_slab,
|
block_dark_prismarine_slab,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ enum mc_block_id {
|
|||||||
block_wooden_door = 64,
|
block_wooden_door = 64,
|
||||||
block_ladder = 65,
|
block_ladder = 65,
|
||||||
block_rail = 66,
|
block_rail = 66,
|
||||||
block_stone_stairs = 67,
|
block_cobblestone_stairs = 67,
|
||||||
block_wall_sign = 68,
|
block_wall_sign = 68,
|
||||||
block_lever = 69,
|
block_lever = 69,
|
||||||
block_stone_pressure_plate = 70,
|
block_stone_pressure_plate = 70,
|
||||||
@@ -295,6 +295,16 @@ enum mc_block_id {
|
|||||||
block_mossy_stone_brick_wall = 11372,
|
block_mossy_stone_brick_wall = 11372,
|
||||||
block_lantern = 11373,
|
block_lantern = 11373,
|
||||||
block_smooth_sandstone_stairs = 11374,
|
block_smooth_sandstone_stairs = 11374,
|
||||||
|
block_smooth_quartz_stairs = 11375,
|
||||||
|
block_polished_granite_stairs = 11376,
|
||||||
|
block_polished_diorite_stairs = 11377,
|
||||||
|
block_polished_andesite_stairs = 11378,
|
||||||
|
block_stone_stairs = 11379,
|
||||||
|
block_granite_stairs = 11380,
|
||||||
|
block_diorite_stairs = 11381,
|
||||||
|
block_andesite_stairs = 11382,
|
||||||
|
block_end_stone_brick_stairs = 11383,
|
||||||
|
block_red_nether_brick_stairs = 11384,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef uint16_t mc_block_t;
|
typedef uint16_t mc_block_t;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
// increment this value if you've made a change to the c extesion
|
// increment this value if you've made a change to the c extesion
|
||||||
// and want to force users to rebuild
|
// and want to force users to rebuild
|
||||||
#define OVERVIEWER_EXTENSION_VERSION 72
|
#define OVERVIEWER_EXTENSION_VERSION 73
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -1703,8 +1703,8 @@ def slabs(self, blockid, data):
|
|||||||
|
|
||||||
if blockid == 44 or blockid == 43:
|
if blockid == 44 or blockid == 43:
|
||||||
if texture== 0: # stone slab
|
if texture== 0: # stone slab
|
||||||
top = self.load_image_texture("assets/minecraft/textures/block/smooth_stone.png")
|
top = self.load_image_texture("assets/minecraft/textures/block/stone.png")
|
||||||
side = self.load_image_texture("assets/minecraft/textures/block/smooth_stone_slab_side.png")
|
side = self.load_image_texture("assets/minecraft/textures/block/stone.png")
|
||||||
elif texture== 1: # sandstone slab
|
elif texture== 1: # sandstone slab
|
||||||
top = self.load_image_texture("assets/minecraft/textures/block/sandstone_top.png")
|
top = self.load_image_texture("assets/minecraft/textures/block/sandstone_top.png")
|
||||||
side = self.load_image_texture("assets/minecraft/textures/block/sandstone.png")
|
side = self.load_image_texture("assets/minecraft/textures/block/sandstone.png")
|
||||||
@@ -1947,9 +1947,12 @@ def fire(self, blockid, data):
|
|||||||
# monster spawner
|
# monster spawner
|
||||||
block(blockid=52, top_image="assets/minecraft/textures/block/spawner.png", transparent=True)
|
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, red sandstone, (dark) prismarine, mossy brick and mossy cobblestone stairs.
|
# wooden, cobblestone, red brick, stone brick, netherbrick, sandstone, spruce, birch,
|
||||||
@material(blockid=[53,67,108,109,114,128,134,135,136,156,163,164,180,203,11337,11338,11339,
|
# jungle, quartz, red sandstone, (dark) prismarine, mossy brick and mossy cobblestone, stone smooth_quartz
|
||||||
11370, 11371, 11374], data=list(range(128)), transparent=True, solid=True, nospawn=True)
|
# polished_granite polished_andesite polished_diorite granite diorite andesite end_stone_bricks red_nether_brick stairs
|
||||||
|
@material(blockid=[53, 67, 108, 109, 114, 128, 134, 135, 136, 156, 163, 164, 180, 203, 11337, 11338, 11339,
|
||||||
|
11370, 11371, 11374, 11375, 11376, 11377, 11378, 11379, 11380, 11381, 11382, 11383, 11384],
|
||||||
|
data=list(range(128)), transparent=True, solid=True, nospawn=True)
|
||||||
def stairs(self, blockid, data):
|
def stairs(self, blockid, data):
|
||||||
# preserve the upside-down bit
|
# preserve the upside-down bit
|
||||||
upside_down = data & 0x4
|
upside_down = data & 0x4
|
||||||
@@ -1983,6 +1986,16 @@ def stairs(self, blockid, data):
|
|||||||
11370: "assets/minecraft/textures/block/mossy_stone_bricks.png",
|
11370: "assets/minecraft/textures/block/mossy_stone_bricks.png",
|
||||||
11371: "assets/minecraft/textures/block/mossy_cobblestone.png",
|
11371: "assets/minecraft/textures/block/mossy_cobblestone.png",
|
||||||
11374: "assets/minecraft/textures/block/sandstone_top.png",
|
11374: "assets/minecraft/textures/block/sandstone_top.png",
|
||||||
|
11375: "assets/minecraft/textures/block/quartz_block_side.png",
|
||||||
|
11376: "assets/minecraft/textures/block/polished_granite.png",
|
||||||
|
11377: "assets/minecraft/textures/block/polished_diorite.png",
|
||||||
|
11378: "assets/minecraft/textures/block/polished_andesite.png",
|
||||||
|
11379: "assets/minecraft/textures/block/stone.png",
|
||||||
|
11380: "assets/minecraft/textures/block/granite.png",
|
||||||
|
11381: "assets/minecraft/textures/block/diorite.png",
|
||||||
|
11382: "assets/minecraft/textures/block/andesite.png",
|
||||||
|
11383: "assets/minecraft/textures/block/end_stone_bricks.png",
|
||||||
|
11384: "assets/minecraft/textures/block/red_nether_bricks.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
texture = self.load_image_texture(stair_id_to_tex[blockid]).copy()
|
texture = self.load_image_texture(stair_id_to_tex[blockid]).copy()
|
||||||
@@ -1993,13 +2006,16 @@ def stairs(self, blockid, data):
|
|||||||
inside_r = texture.copy()
|
inside_r = texture.copy()
|
||||||
|
|
||||||
# sandstone, red sandstone, and quartz stairs have special top texture
|
# sandstone, red sandstone, and quartz stairs have special top texture
|
||||||
if blockid == 128:
|
special_tops = {
|
||||||
texture = self.load_image_texture("assets/minecraft/textures/block/sandstone_top.png").copy()
|
128: "assets/minecraft/textures/block/sandstone_top.png",
|
||||||
elif blockid == 156:
|
156: "assets/minecraft/textures/block/quartz_block_top.png",
|
||||||
texture = self.load_image_texture("assets/minecraft/textures/block/quartz_block_top.png").copy()
|
180: "assets/minecraft/textures/block/red_sandstone_top.png",
|
||||||
elif blockid == 180:
|
11375: "assets/minecraft/textures/block/quartz_block_top.png",
|
||||||
texture = self.load_image_texture("assets/minecraft/textures/block/red_sandstone_top.png").copy()
|
}
|
||||||
|
|
||||||
|
if blockid in special_tops:
|
||||||
|
texture = self.load_image_texture(special_tops[blockid]).copy()
|
||||||
|
|
||||||
|
|
||||||
slab_top = texture.copy()
|
slab_top = texture.copy()
|
||||||
|
|
||||||
|
|||||||
@@ -435,7 +435,6 @@ class RegionSet(object):
|
|||||||
'minecraft:oak_door': (64, 0),
|
'minecraft:oak_door': (64, 0),
|
||||||
'minecraft:ladder': (65, 0),
|
'minecraft:ladder': (65, 0),
|
||||||
'minecraft:rail': (66, 0),
|
'minecraft:rail': (66, 0),
|
||||||
'minecraft:stone_stairs': (67, 0),
|
|
||||||
'minecraft:cobblestone_stairs': (67, 0),
|
'minecraft:cobblestone_stairs': (67, 0),
|
||||||
'minecraft:wall_sign': (68, 0),
|
'minecraft:wall_sign': (68, 0),
|
||||||
'minecraft:lever': (69, 0),
|
'minecraft:lever': (69, 0),
|
||||||
@@ -810,6 +809,16 @@ class RegionSet(object):
|
|||||||
"minecraft:mossy_stone_brick_wall": (11372, 0),
|
"minecraft:mossy_stone_brick_wall": (11372, 0),
|
||||||
"minecraft:lantern": (11373, 0),
|
"minecraft:lantern": (11373, 0),
|
||||||
"minecraft:smooth_sandstone_stairs": (11374, 0),
|
"minecraft:smooth_sandstone_stairs": (11374, 0),
|
||||||
|
'minecraft:smooth_quartz_stairs': (11375, 0),
|
||||||
|
'minecraft:polished_granite_stairs': (11376, 0),
|
||||||
|
'minecraft:polished_diorite_stairs': (11377, 0),
|
||||||
|
'minecraft:polished_andesite_stairs': (11378, 0),
|
||||||
|
'minecraft:stone_stairs': (11379, 0),
|
||||||
|
'minecraft:granite_stairs': (11380, 0),
|
||||||
|
'minecraft:diorite_stairs': (11381, 0),
|
||||||
|
'minecraft:andesite_stairs': (11382, 0),
|
||||||
|
'minecraft:end_stone_brick_stairs': (11383, 0),
|
||||||
|
'minecraft:red_nether_brick_stairs': (11384, 0),
|
||||||
}
|
}
|
||||||
|
|
||||||
colors = [ 'white', 'orange', 'magenta', 'light_blue',
|
colors = [ 'white', 'orange', 'magenta', 'light_blue',
|
||||||
@@ -900,7 +909,7 @@ class RegionSet(object):
|
|||||||
if key == 'minecraft:stone_brick_slab':
|
if key == 'minecraft:stone_brick_slab':
|
||||||
block = 98
|
block = 98
|
||||||
elif key == 'minecraft:stone_slab':
|
elif key == 'minecraft:stone_slab':
|
||||||
block = 43 # block_double_stone_slab
|
block = 1 # stone data 0
|
||||||
elif key == 'minecraft:cobblestone_slab':
|
elif key == 'minecraft:cobblestone_slab':
|
||||||
block = 4 # cobblestone
|
block = 4 # cobblestone
|
||||||
elif key == 'minecraft:sandstone_slab':
|
elif key == 'minecraft:sandstone_slab':
|
||||||
|
|||||||
Reference in New Issue
Block a user