textures: add cut copper slabs
Also fix copper stairs stuff not being in alt_height.
This commit is contained in:
@@ -315,7 +315,23 @@ const mc_block_t block_class_alt_height[] = {
|
|||||||
block_stone_slab2,
|
block_stone_slab2,
|
||||||
block_purpur_stairs,
|
block_purpur_stairs,
|
||||||
block_purpur_slab,
|
block_purpur_slab,
|
||||||
block_wooden_slab};
|
block_wooden_slab,
|
||||||
|
block_cut_copper_stairs,
|
||||||
|
block_exposed_cut_copper_stairs,
|
||||||
|
block_weathered_cut_copper_stairs,
|
||||||
|
block_oxidized_cut_copper_stairs,
|
||||||
|
block_waxed_cut_copper_stairs,
|
||||||
|
block_waxed_exposed_cut_copper_stairs,
|
||||||
|
block_waxed_weathered_cut_copper_stairs,
|
||||||
|
block_waxed_oxidized_cut_copper_stairs,
|
||||||
|
block_cut_copper_slab,
|
||||||
|
block_exposed_cut_copper_slab,
|
||||||
|
block_weathered_cut_copper_slab,
|
||||||
|
block_oxidized_cut_copper_slab,
|
||||||
|
block_waxed_cut_copper_slab,
|
||||||
|
block_waxed_exposed_cut_copper_slab,
|
||||||
|
block_waxed_weathered_cut_copper_slab,
|
||||||
|
block_waxed_oxidized_cut_copper_slab};
|
||||||
const size_t block_class_alt_height_len = COUNT_OF(block_class_alt_height);
|
const size_t block_class_alt_height_len = COUNT_OF(block_class_alt_height);
|
||||||
|
|
||||||
const mc_block_t block_class_nether_roof[] = {
|
const mc_block_t block_class_nether_roof[] = {
|
||||||
|
|||||||
@@ -348,6 +348,16 @@ enum mc_block_id {
|
|||||||
block_waxed_weathered_cut_copper_stairs = 1070,
|
block_waxed_weathered_cut_copper_stairs = 1070,
|
||||||
block_waxed_oxidized_cut_copper_stairs = 1071,
|
block_waxed_oxidized_cut_copper_stairs = 1071,
|
||||||
|
|
||||||
|
block_cut_copper_slab = 1072,
|
||||||
|
block_exposed_cut_copper_slab = 1073,
|
||||||
|
block_weathered_cut_copper_slab = 1074,
|
||||||
|
block_oxidized_cut_copper_slab = 1075,
|
||||||
|
|
||||||
|
block_waxed_cut_copper_slab = 1076,
|
||||||
|
block_waxed_exposed_cut_copper_slab = 1077,
|
||||||
|
block_waxed_weathered_cut_copper_slab = 1078,
|
||||||
|
block_waxed_oxidized_cut_copper_slab = 1079,
|
||||||
|
|
||||||
// adding a gap in the numbering of walls to keep them all
|
// adding a gap in the numbering of walls to keep them all
|
||||||
// in one numbering block starting at 1792
|
// in one numbering block starting at 1792
|
||||||
// all blocks between 1792 and 2047 are considered walls
|
// all blocks between 1792 and 2047 are considered walls
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
// increment this value if you've made a change to the c extension
|
// increment this value if you've made a change to the c extension
|
||||||
// and want to force users to rebuild
|
// and want to force users to rebuild
|
||||||
#define OVERVIEWER_EXTENSION_VERSION 103
|
#define OVERVIEWER_EXTENSION_VERSION 104
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -1674,8 +1674,10 @@ block(blockid=42, top_image="assets/minecraft/textures/block/iron_block.png")
|
|||||||
# double slabs and slabs
|
# double slabs and slabs
|
||||||
# these wooden slabs are unobtainable without cheating, they are still
|
# these wooden slabs are unobtainable without cheating, they are still
|
||||||
# here because lots of pre-1.3 worlds use this blocks, add prismarine slabs
|
# here because lots of pre-1.3 worlds use this blocks, add prismarine slabs
|
||||||
@material(blockid=[43, 44, 181, 182, 204, 205] + list(range(11340,11359)) + list(range(1027,1030)), data=list(range(16)),
|
@material(blockid=[43, 44, 181, 182, 204, 205] + list(range(11340, 11359)) +
|
||||||
transparent=[44, 182, 205] + list(range(11340,11359)) + list(range(1027,1030)), solid=True)
|
list(range(1027, 1030)) + list(range(1072, 1080)), data=list(range(16)),
|
||||||
|
transparent=[44, 182, 205] + list(range(11340, 11359)) + list(range(1027, 1030)) +
|
||||||
|
list(range(1072, 1080)), solid=True)
|
||||||
def slabs(self, blockid, data):
|
def slabs(self, blockid, data):
|
||||||
if blockid == 44 or blockid == 182:
|
if blockid == 44 or blockid == 182:
|
||||||
texture = data & 7
|
texture = data & 7
|
||||||
@@ -1771,6 +1773,18 @@ def slabs(self, blockid, data):
|
|||||||
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_blackstone.png").copy()
|
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_blackstone.png").copy()
|
||||||
elif blockid == 1029: # polished_blackstone_brick_slab
|
elif blockid == 1029: # polished_blackstone_brick_slab
|
||||||
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_blackstone_bricks.png").copy()
|
top = side = self.load_image_texture("assets/minecraft/textures/block/polished_blackstone_bricks.png").copy()
|
||||||
|
elif blockid in range(1072, 1080):
|
||||||
|
copper_tex = {
|
||||||
|
1072: "assets/minecraft/textures/block/cut_copper.png",
|
||||||
|
1076: "assets/minecraft/textures/block/cut_copper.png",
|
||||||
|
1073: "assets/minecraft/textures/block/exposed_cut_copper.png",
|
||||||
|
1077: "assets/minecraft/textures/block/exposed_cut_copper.png",
|
||||||
|
1074: "assets/minecraft/textures/block/weathered_cut_copper.png",
|
||||||
|
1078: "assets/minecraft/textures/block/weathered_cut_copper.png",
|
||||||
|
1075: "assets/minecraft/textures/block/oxidized_cut_copper.png",
|
||||||
|
1079: "assets/minecraft/textures/block/oxidized_cut_copper.png",
|
||||||
|
}
|
||||||
|
top = side = self.load_image_texture(copper_tex[blockid]).copy()
|
||||||
|
|
||||||
if blockid == 43 or blockid == 181 or blockid == 204: # double slab
|
if blockid == 43 or blockid == 181 or blockid == 204: # double slab
|
||||||
return self.build_block(top, side)
|
return self.build_block(top, side)
|
||||||
|
|||||||
@@ -802,6 +802,14 @@ class RegionSet(object):
|
|||||||
'minecraft:waxed_exposed_cut_copper_stairs': (1069, 0),
|
'minecraft:waxed_exposed_cut_copper_stairs': (1069, 0),
|
||||||
'minecraft:waxed_weathered_cut_copper_stairs': (1070, 0),
|
'minecraft:waxed_weathered_cut_copper_stairs': (1070, 0),
|
||||||
'minecraft:waxed_oxidized_cut_copper_stairs': (1071, 0),
|
'minecraft:waxed_oxidized_cut_copper_stairs': (1071, 0),
|
||||||
|
'minecraft:cut_copper_slab': (1072, 0),
|
||||||
|
'minecraft:exposed_cut_copper_slab': (1073, 0),
|
||||||
|
'minecraft:weathered_cut_copper_slab': (1074, 0),
|
||||||
|
'minecraft:oxidized_cut_copper_slab': (1075, 0),
|
||||||
|
'minecraft:waxed_cut_copper_slab': (1076, 0),
|
||||||
|
'minecraft:waxed_exposed_cut_copper_slab': (1077, 0),
|
||||||
|
'minecraft:waxed_weathered_cut_copper_slab': (1078, 0),
|
||||||
|
'minecraft:waxed_oxidized_cut_copper_slab': (1079, 0),
|
||||||
|
|
||||||
# New blocks
|
# New blocks
|
||||||
'minecraft:carved_pumpkin': (11300, 0),
|
'minecraft:carved_pumpkin': (11300, 0),
|
||||||
@@ -991,6 +999,16 @@ class RegionSet(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
prismarine_slabs = ('minecraft:prismarine_slab','minecraft:dark_prismarine_slab','minecraft:prismarine_brick_slab')
|
prismarine_slabs = ('minecraft:prismarine_slab','minecraft:dark_prismarine_slab','minecraft:prismarine_brick_slab')
|
||||||
|
copper_slabs = (
|
||||||
|
'minecraft:cut_copper_slab',
|
||||||
|
'minecraft:exposed_cut_copper_slab',
|
||||||
|
'minecraft:weathered_cut_copper_slab',
|
||||||
|
'minecraft:oxidized_cut_copper_slab',
|
||||||
|
'minecraft:waxed_cut_copper_slab',
|
||||||
|
'minecraft:waxed_exposed_cut_copper_slab',
|
||||||
|
'minecraft:waxed_weathered_cut_copper_slab',
|
||||||
|
'minecraft:waxed_oxidized_cut_copper_slab'
|
||||||
|
)
|
||||||
|
|
||||||
colors = ['white', 'orange', 'magenta', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'light_gray', 'cyan',
|
colors = ['white', 'orange', 'magenta', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'light_gray', 'cyan',
|
||||||
'purple', 'blue', 'brown', 'green', 'red', 'black']
|
'purple', 'blue', 'brown', 'green', 'red', 'black']
|
||||||
@@ -1030,7 +1048,7 @@ class RegionSet(object):
|
|||||||
elif key in ('minecraft:sunflower', 'minecraft:lilac', 'minecraft:tall_grass', 'minecraft:large_fern', 'minecraft:rose_bush', 'minecraft:peony'):
|
elif key in ('minecraft:sunflower', 'minecraft:lilac', 'minecraft:tall_grass', 'minecraft:large_fern', 'minecraft:rose_bush', 'minecraft:peony'):
|
||||||
if palette_entry['Properties']['half'] == 'upper':
|
if palette_entry['Properties']['half'] == 'upper':
|
||||||
data |= 0x08
|
data |= 0x08
|
||||||
elif key in wood_slabs + stone_slabs + prismarine_slabs:
|
elif key in wood_slabs + stone_slabs + prismarine_slabs + copper_slabs:
|
||||||
# handle double slabs
|
# handle double slabs
|
||||||
if palette_entry['Properties']['type'] == 'top':
|
if palette_entry['Properties']['type'] == 'top':
|
||||||
data |= 0x08
|
data |= 0x08
|
||||||
@@ -1122,6 +1140,9 @@ class RegionSet(object):
|
|||||||
data = 1
|
data = 1
|
||||||
elif key == 'minecraft:dark_prismarine_slab':
|
elif key == 'minecraft:dark_prismarine_slab':
|
||||||
data = 2
|
data = 2
|
||||||
|
elif key in copper_slabs:
|
||||||
|
# dumb hack because I'm lazy but this function is horrid anyway
|
||||||
|
block = block - 18
|
||||||
|
|
||||||
elif key in ['minecraft:ladder', 'minecraft:chest', 'minecraft:ender_chest',
|
elif key in ['minecraft:ladder', 'minecraft:chest', 'minecraft:ender_chest',
|
||||||
'minecraft:trapped_chest', 'minecraft:furnace',
|
'minecraft:trapped_chest', 'minecraft:furnace',
|
||||||
|
|||||||
Reference in New Issue
Block a user