added new 1.14 slabs, referencing issue #1560
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -40,3 +40,4 @@ overviewer_core/src/primitives.h
|
||||
.idea
|
||||
/.vs/Minecraft-Overviewer/v15/.suo
|
||||
/.vs
|
||||
.vscode
|
||||
|
||||
@@ -187,6 +187,22 @@ const mc_block_t block_class_alt_height[] = {
|
||||
block_prismarine_slab,
|
||||
block_dark_prismarine_slab,
|
||||
block_prismarine_brick_slab,
|
||||
block_andesite_slab,
|
||||
block_diorite_slab,
|
||||
block_granite_slab,
|
||||
block_polished_andesite_slab,
|
||||
block_polished_diorite_slab,
|
||||
block_polished_granite_slab,
|
||||
block_red_nether_brick_slab,
|
||||
block_smooth_sandstone_slab,
|
||||
block_cut_sandstone_slab,
|
||||
block_smooth_red_sandstone_slab,
|
||||
block_cut_red_sandstone_slab,
|
||||
block_end_stone_brick_slab,
|
||||
block_mossy_cobblestone_slab,
|
||||
block_mossy_stone_brick_slab,
|
||||
block_smooth_quartz_slab,
|
||||
block_smooth_stone_slab,
|
||||
block_stone_slab2,
|
||||
block_purpur_stairs,
|
||||
block_purpur_slab,
|
||||
|
||||
@@ -263,7 +263,23 @@ enum mc_block_id
|
||||
block_prismarine_brick_stairs = 11339,
|
||||
block_prismarine_slab = 11340,
|
||||
block_dark_prismarine_slab = 11341,
|
||||
block_prismarine_brick_slab = 11342
|
||||
block_prismarine_brick_slab = 11342,
|
||||
block_andesite_slab = 11343,
|
||||
block_diorite_slab = 11344,
|
||||
block_granite_slab = 11345,
|
||||
block_polished_andesite_slab = 11346,
|
||||
block_polished_diorite_slab = 11347,
|
||||
block_polished_granite_slab = 11348,
|
||||
block_red_nether_brick_slab = 11349,
|
||||
block_smooth_sandstone_slab = 11350,
|
||||
block_cut_sandstone_slab = 11351,
|
||||
block_smooth_red_sandstone_slab = 11352,
|
||||
block_cut_red_sandstone_slab = 11353,
|
||||
block_end_stone_brick_slab = 11354,
|
||||
block_mossy_cobblestone_slab = 11355,
|
||||
block_mossy_stone_brick_slab = 11356,
|
||||
block_smooth_quartz_slab = 11357,
|
||||
block_smooth_stone_slab = 11358,
|
||||
};
|
||||
|
||||
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 61
|
||||
#define OVERVIEWER_EXTENSION_VERSION 62
|
||||
|
||||
/* Python PIL, and numpy headers */
|
||||
#include <Python.h>
|
||||
|
||||
@@ -1708,8 +1708,8 @@ block(blockid=42, top_image="assets/minecraft/textures/block/iron_block.png")
|
||||
# double slabs and slabs
|
||||
# these wooden slabs are unobtainable without cheating, they are still
|
||||
# here because lots of pre-1.3 worlds use this blocks, add prismarine slabs
|
||||
@material(blockid=[43, 44, 181, 182, 204, 205, 11340, 11341, 11342], data=range(16),
|
||||
transparent=(44, 182, 205, 11340, 11341, 11342), solid=True)
|
||||
@material(blockid=((43, 44, 181, 182, 204, 205) + tuple(range(11340,11359))), data=range(16),
|
||||
transparent=((44, 182, 205) + tuple(range(11340,11359)) ), solid=True)
|
||||
def slabs(self, blockid, data):
|
||||
if blockid == 44 or blockid == 182:
|
||||
texture = data & 7
|
||||
@@ -1766,7 +1766,40 @@ def slabs(self, blockid, data):
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/dark_prismarine.png").copy()
|
||||
elif blockid == 11342: # prismarine brick slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/prismarine_bricks.png").copy()
|
||||
|
||||
elif blockid == 11343: # andesite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/andesite.png").copy()
|
||||
elif blockid == 11344: # diorite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/diorite.png").copy()
|
||||
elif blockid == 11345: # granite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/granite.png").copy()
|
||||
elif blockid == 11346: # polished andesite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_andesite.png").copy()
|
||||
elif blockid == 11347: # polished diorite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_diorite.png").copy()
|
||||
elif blockid == 11348: # polished granite slabs
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_granite.png").copy()
|
||||
elif blockid == 11349: # red nether brick slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/red_nether_bricks.png").copy()
|
||||
elif blockid == 11350: # smooth sandstone slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/sandstone_top.png").copy()
|
||||
elif blockid == 11351: # cut sandstone slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/cut_sandstone.png").copy()
|
||||
elif blockid == 11352: # smooth red sandstone slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/red_sandstone_top.png").copy()
|
||||
elif blockid == 11353: # cut red sandstone slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/cut_red_sandstone.png").copy()
|
||||
elif blockid == 11354: # end_stone_brick_slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/end_stone_bricks.png").copy()
|
||||
elif blockid == 11355: # mossy_cobblestone_slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/mossy_cobblestone.png").copy()
|
||||
elif blockid == 11356: # mossy_stone_brick_slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/mossy_stone_bricks.png").copy()
|
||||
elif blockid == 11357: # smooth_quartz_slab
|
||||
top = side = self.load_image_texture("assets/minecraft/textures/block/quartz_block_bottom.png").copy()
|
||||
elif blockid == 11358: # smooth_stone_slab
|
||||
top = self.load_image_texture("assets/minecraft/textures/block/smooth_stone.png").copy()
|
||||
side = self.load_image_texture("assets/minecraft/textures/block/smooth_stone_slab_side.png").copy()
|
||||
|
||||
if blockid == 43 or blockid == 181 or blockid == 204: # double slab
|
||||
return self.build_block(top, side)
|
||||
|
||||
|
||||
@@ -780,6 +780,22 @@ class RegionSet(object):
|
||||
'minecraft:prismarine_slab': (11340, 0),
|
||||
'minecraft:dark_prismarine_slab': (11341, 0),
|
||||
'minecraft:prismarine_brick_slab': (11342, 0),
|
||||
"minecraft:andesite_slab": (11343, 0),
|
||||
"minecraft:diorite_slab": (11344, 0),
|
||||
"minecraft:granite_slab": (11345, 0),
|
||||
"minecraft:polished_andesite_slab": (11346, 0),
|
||||
"minecraft:polished_diorite_slab": (11347, 0),
|
||||
"minecraft:polished_granite_slab": (11348, 0),
|
||||
"minecraft:red_nether_brick_slab": (11349, 0),
|
||||
"minecraft:smooth_sandstone_slab": (11350,0),
|
||||
"minecraft:cut_sandstone_slab": (11351,0),
|
||||
"minecraft:smooth_red_sandstone_slab": (11352,0),
|
||||
"minecraft:cut_red_sandstone_slab": (11353,0),
|
||||
"minecraft:end_stone_brick_slab": (11354,0),
|
||||
"minecraft:mossy_cobblestone_slab": (11355,0),
|
||||
"minecraft:mossy_stone_brick_slab": (11356,0),
|
||||
"minecraft:smooth_quartz_slab": (11357,0),
|
||||
"minecraft:smooth_stone_slab": (11358,0),
|
||||
}
|
||||
|
||||
colors = [ 'white', 'orange', 'magenta', 'light_blue',
|
||||
@@ -810,7 +826,15 @@ class RegionSet(object):
|
||||
stone_slabs = ('minecraft:stone_slab', 'minecraft:sandstone_slab','minecraft:red_sandstone_slab',
|
||||
'minecraft:cobblestone_slab', 'minecraft:brick_slab','minecraft:purpur_slab',
|
||||
'minecraft:stone_brick_slab', 'minecraft:nether_brick_slab',
|
||||
'minecraft:quartz_slab')
|
||||
'minecraft:quartz_slab', "minecraft:andesite_slab", 'minecraft:diorite_slab',
|
||||
'minecraft:granite_slab', 'minecraft:polished_andesite_slab',
|
||||
'minecraft:polished_diorite_slab','minecraft:polished_granite_slab',
|
||||
'minecraft:red_nether_brick_slab','minecraft:smooth_sandstone_slab',
|
||||
'minecraft:cut_sandstone_slab','minecraft:smooth_red_sandstone_slab',
|
||||
'minecraft:cut_red_sandstone_slab','minecraft:end_stone_brick_slab',
|
||||
'minecraft:mossy_cobblestone_slab','minecraft:mossy_stone_brick_slab',
|
||||
'minecraft:smooth_quartz_slab','minecraft:smooth_stone_slab'
|
||||
)
|
||||
prismarine_slabs = ('minecraft:prismarine_slab','minecraft:dark_prismarine_slab','minecraft:prismarine_brick_slab')
|
||||
|
||||
key = palette_entry['Name']
|
||||
@@ -870,6 +894,55 @@ class RegionSet(object):
|
||||
block = 45 # minecraft:bricks
|
||||
elif key == 'minecraft:purpur_slab':
|
||||
block = 201 # minecraft:purpur_block
|
||||
elif key == 'minecraft:andesite_slab':
|
||||
block = 1 # minecraft:andesite
|
||||
data = 5
|
||||
elif key == 'minecraft:diorite_slab':
|
||||
block = 1 # minecraft:diorite
|
||||
data = 3
|
||||
elif key == 'minecraft:granite_slab':
|
||||
block = 1 # minecraft:granite
|
||||
data = 1
|
||||
elif key == 'minecraft:polished_andesite_slab':
|
||||
block = 1 # minecraft: polished_andesite
|
||||
data = 6
|
||||
elif key == 'minecraft:polished_diorite_slab':
|
||||
block = 1 # minecraft: polished_diorite
|
||||
data = 4
|
||||
elif key == 'minecraft:polished_granite_slab':
|
||||
block = 1 # minecraft: polished_granite
|
||||
data = 2
|
||||
elif key == 'minecraft:red_nether_brick_slab':
|
||||
block = 215 # minecraft: red_nether_brick
|
||||
data = 0
|
||||
elif key == 'minecraft:smooth_sandstone_slab':
|
||||
block = 11314 # minecraft: smooth_sandstone
|
||||
data = 0
|
||||
elif key == 'minecraft:cut_sandstone_slab':
|
||||
block = 24 # minecraft: cut_sandstone
|
||||
data = 2
|
||||
elif key == 'minecraft:smooth_red_sandstone_slab':
|
||||
block = 11315 # minecraft: smooth_red_sandstone
|
||||
data = 0
|
||||
elif key == 'minecraft:cut_red_sandstone_slab':
|
||||
block = 179 # minecraft: cut_red_sandstone
|
||||
data = 2
|
||||
elif key == 'minecraft:end_stone_brick_slab':
|
||||
block = 206 # minecraft:end_stone_bricks
|
||||
data = 0
|
||||
elif key == 'minecraft:mossy_cobblestone_slab':
|
||||
block = 48 # minecraft:mossy_cobblestone
|
||||
data = 0
|
||||
elif key == 'minecraft:mossy_stone_brick_slab':
|
||||
block = 98 # minecraft:mossy_stone_bricks
|
||||
data = 1
|
||||
elif key == 'minecraft:smooth_quartz_slab':
|
||||
block = 155 # minecraft:smooth_quartz
|
||||
data = 0
|
||||
elif key == 'minecraft:smooth_stone_slab':
|
||||
block = 11313 # minecraft:smooth_stone
|
||||
data = 0
|
||||
|
||||
elif key in prismarine_slabs:
|
||||
block = 168 # minecraft:prismarine variants
|
||||
if key == 'minecraft:prismarine_slab':
|
||||
@@ -878,6 +951,7 @@ class RegionSet(object):
|
||||
data = 1
|
||||
elif key == 'minecraft:dark_prismarine_slab':
|
||||
data = 2
|
||||
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user