From 1ab66dddea1078e925f2e5ca761ce7615a45f142 Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Sun, 31 Mar 2019 19:17:45 +0200 Subject: [PATCH] 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. --- overviewer_core/src/block_class.c | 8 +- overviewer_core/src/mc_id.h | 962 +++++++++++----------- overviewer_core/src/overviewer.h | 2 +- overviewer_core/src/primitives/lighting.c | 6 +- overviewer_core/textures.py | 8 +- overviewer_core/world.py | 2 + 6 files changed, 502 insertions(+), 486 deletions(-) diff --git a/overviewer_core/src/block_class.c b/overviewer_core/src/block_class.c index c88e201..eb5ec06 100644 --- a/overviewer_core/src/block_class.c +++ b/overviewer_core/src/block_class.c @@ -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, diff --git a/overviewer_core/src/mc_id.h b/overviewer_core/src/mc_id.h index aa18562..845082c 100644 --- a/overviewer_core/src/mc_id.h +++ b/overviewer_core/src/mc_id.h @@ -1,480 +1,482 @@ -#ifndef __MC_ID_H_INCLUDED__ -#define __MC_ID_H_INCLUDED__ - -#include - -enum mc_block_id -{ - block_air = 0, - block_stone = 1, - block_grass = 2, - block_dirt = 3, - block_cobblestone = 4, - block_planks = 5, - block_sapling = 6, - block_bedrock = 7, - block_flowing_water = 8, - block_water = 9, - block_flowing_lava = 10, - block_lava = 11, - block_sand = 12, - block_gravel = 13, - block_gold_ore = 14, - block_iron_ore = 15, - block_coal_ore = 16, - block_log = 17, - block_leaves = 18, - block_sponge = 19, - block_glass = 20, - block_lapis_ore = 21, - block_lapis_block = 22, - block_dispenser = 23, - block_sandstone = 24, - block_noteblock = 25, - block_bed = 26, - block_golden_rail = 27, - block_detector_rail = 28, - block_sticky_piston = 29, - block_web = 30, - block_tallgrass = 31, - block_deadbush = 32, - block_piston = 33, - block_piston_head = 34, - block_wool = 35, - block_yellow_flower = 37, - block_red_flower = 38, - block_brown_mushroom = 39, - block_red_mushroom = 40, - block_gold_block = 41, - block_iron_block = 42, - block_double_stone_slab = 43, - block_stone_slab = 44, - block_brick_block = 45, - block_tnt = 46, - block_bookshelf = 47, - block_mossy_cobblestone = 48, - block_obsidian = 49, - block_torch = 50, - block_fire = 51, - block_mob_spawner = 52, - block_oak_stairs = 53, - block_chest = 54, - block_redstone_wire = 55, - block_diamond_ore = 56, - block_diamond_block = 57, - block_crafting_table = 58, - block_wheat = 59, - block_farmland = 60, - block_furnace = 61, - block_lit_furnace = 62, - block_standing_sign = 63, - block_wooden_door = 64, - block_ladder = 65, - block_rail = 66, - block_stone_stairs = 67, - block_wall_sign = 68, - block_lever = 69, - block_stone_pressure_plate = 70, - block_iron_door = 71, - block_wooden_pressure_plate = 72, - block_redstone_ore = 73, - block_lit_redstone_ore = 74, - block_unlit_redstone_torch = 75, - block_redstone_torch = 76, - block_stone_button = 77, - block_snow_layer = 78, - block_ice = 79, - block_snow = 80, - block_cactus = 81, - block_clay = 82, - block_reeds = 83, - block_jukebox = 84, - block_fence = 85, - block_pumpkin = 86, - block_netherrack = 87, - block_soul_sand = 88, - block_glowstone = 89, - block_portal = 90, - block_lit_pumpkin = 91, - block_cake = 92, - block_unpowered_repeater = 93, - block_powered_repeater = 94, - block_stained_glass = 95, - block_trapdoor = 96, - block_monster_egg = 97, - block_stonebrick = 98, - block_brown_mushroom_block = 99, - block_red_mushroom_block = 100, - block_iron_bars = 101, - block_glass_pane = 102, - block_melon_block = 103, - block_pumpkin_stem = 104, - block_melon_stem = 105, - block_vine = 106, - block_fence_gate = 107, - block_brick_stairs = 108, - block_stone_brick_stairs = 109, - block_mycelium = 110, - block_waterlily = 111, - block_nether_brick = 112, - block_nether_brick_fence = 113, - block_nether_brick_stairs = 114, - block_nether_wart = 115, - block_enchanting_table = 116, - block_brewing_stand = 117, - block_cauldron = 118, - block_end_portal = 119, - block_end_portal_frame = 120, - block_end_stone = 121, - block_dragon_egg = 122, - block_redstone_lamp = 123, - block_lit_redstone_lamp = 124, - block_double_wooden_slab = 125, - block_wooden_slab = 126, - block_cocoa = 127, - block_sandstone_stairs = 128, - block_emerald_ore = 129, - block_ender_chest = 130, - block_tripwire_hook = 131, - block_tripwire_wire = 132, - block_emerald_block = 133, - block_spruce_stairs = 134, - block_birch_stairs = 135, - block_jungle_stairs = 136, - block_command_block = 137, - block_beacon = 138, - block_cobblestone_wall = 139, - block_flower_pot = 140, - block_carrots = 141, - block_potatoes = 142, - block_wooden_button = 143, - block_skull = 144, - block_anvil = 145, - block_trapped_chest = 146, - block_light_weighted_pressure_plate = 147, - block_heavy_weighted_pressure_plate = 148, - block_unpowered_comparator = 149, - block_powered_comparator = 150, - block_daylight_detector = 151, - block_redstone_block = 152, - block_quartz_ore = 153, - block_hopper = 154, - block_quartz_block = 155, - block_quartz_stairs = 156, - block_activator_rail = 157, - block_dropper = 158, - block_stained_hardened_clay = 159, - block_stained_glass_pane = 160, - block_leaves2 = 161, - block_log2 = 162, - block_acacia_stairs = 163, - block_dark_oak_stairs = 164, - block_slime = 165, - block_barrier = 166, - block_iron_trapdoor = 167, - block_prismarine = 168, - block_sea_lantern = 169, - block_hay_block = 170, - block_carpet = 171, - block_hardened_clay = 172, - block_coal_block = 173, - block_packed_ice = 174, - block_double_plant = 175, - block_standing_banner = 176, - block_wall_banner = 177, - block_daylight_detector_inverted = 178, - block_red_sandstone = 179, - block_red_sandstone_stairs = 180, - block_double_stone_slab2 = 181, - block_stone_slab2 = 182, - block_spruce_fence_gate = 183, - block_birch_fence_gate = 184, - block_jungle_fence_gate = 185, - block_dark_oak_fence_gate = 186, - block_acacia_fence_gate = 187, - block_spruce_fence = 188, - block_birch_fence = 189, - block_jungle_fence = 190, - block_dark_oak_fence = 191, - block_acacia_fence = 192, - block_spruce_door = 193, - block_birch_door = 194, - block_jungle_door = 195, - block_acacia_door = 196, - block_dark_oak_door = 197, - block_end_rod = 198, - block_chorus_plant = 199, - block_chorus_flower = 200, - block_purpur_block = 201, - block_purpur_pillar = 202, - block_purpur_stairs = 203, - block_purpur_double_slab = 204, - block_purpur_slab = 205, - block_end_bricks = 206, - block_beetroots = 207, - block_grass_path = 208, - block_end_gateway = 209, - block_repeating_command_block = 210, - block_chain_command_block = 211, - block_frosted_ice = 212, - block_magma = 213, - block_nether_wart_block = 214, - block_red_nether_brick = 215, - block_bone_block = 216, - block_structure_void = 217, - block_observer = 218, - block_white_shulker_box = 219, - block_orange_shulker_box = 220, - block_magenta_shulker_box = 221, - block_light_blue_shulker_box = 222, - block_yellow_shulker_box = 223, - block_lime_shulker_box = 224, - block_pink_shulker_box = 225, - block_gray_shulker_box = 226, - block_silver_shulker_box = 227, - block_cyan_shulker_box = 228, - block_purple_shulker_box = 229, - block_blue_shulker_box = 230, - block_brown_shulker_box = 231, - block_green_shulker_box = 232, - block_red_shulker_box = 233, - block_black_shulker_box = 234, - block_white_glazed_terracotta = 235, - block_orange_glazed_terracotta = 236, - block_magenta_glazed_terracotta = 237, - block_light_blue_glazed_terracotta = 238, - block_yellow_glazed_terracotta = 239, - block_lime_glazed_terracotta = 240, - block_pink_glazed_terracotta = 241, - block_gray_glazed_terracotta = 242, - block_light_gray_glazed_terracotta = 243, - block_cyan_glazed_terracotta = 244, - block_purple_glazed_terracotta = 245, - block_blue_glazed_terracotta = 246, - block_brown_glazed_terracotta = 247, - block_green_glazed_terracotta = 248, - block_red_glazed_terracotta = 249, - block_black_glazed_terracotta = 250, - block_concrete = 251, - block_concrete_powder = 252, - block_structure_block = 255, -}; - -typedef uint16_t mc_block_t; - - -enum mc_item_id -{ - item_iron_shovel = 256, - item_iron_pickaxe = 257, - item_iron_axe = 258, - item_flint_and_steel = 259, - item_apple = 260, - item_bow = 261, - item_arrow = 262, - item_coal = 263, - item_diamond = 264, - item_iron_ingot = 265, - item_gold_ingot = 266, - item_iron_sword = 267, - item_wooden_sword = 268, - item_wooden_shovel = 269, - item_wooden_pickaxe = 270, - item_wooden_axe = 271, - item_stone_sword = 272, - item_stone_shovel = 273, - item_stone_pickaxe = 274, - item_stone_axe = 275, - item_diamond_sword = 276, - item_diamond_shovel = 277, - item_diamond_pickaxe = 278, - item_diamond_axe = 279, - item_stick = 280, - item_bowl = 281, - item_mushroom_stew = 282, - item_golden_sword = 283, - item_golden_shovel = 284, - item_golden_pickaxe = 285, - item_golden_axe = 286, - item_string = 287, - item_feather = 288, - item_gunpowder = 289, - item_wooden_hoe = 290, - item_stone_hoe = 291, - item_iron_hoe = 292, - item_diamond_hoe = 293, - item_golden_hoe = 294, - item_wheat_seeds = 295, - item_wheat = 296, - item_bread = 297, - item_leather_helmet = 298, - item_leather_chestplate = 299, - item_leather_leggings = 300, - item_leather_boots = 301, - item_chainmail_helmet = 302, - item_chainmail_chestplate = 303, - item_chainmail_leggings = 304, - item_chainmail_boots = 305, - item_iron_helmet = 306, - item_iron_chestplate = 307, - item_iron_leggings = 308, - item_iron_boots = 309, - item_diamond_helmet = 310, - item_diamond_chestplate = 311, - item_diamond_leggings = 312, - item_diamond_boots = 313, - item_golden_helmet = 314, - item_golden_chestplate = 315, - item_golden_leggings = 316, - item_golden_boots = 317, - item_flint = 318, - item_porkchop = 319, - item_cooked_porkchop = 320, - item_painting = 321, - item_golden_apple = 322, - item_sign = 323, - item_wooden_door = 324, - item_bucket = 325, - item_water_bucket = 326, - item_lava_bucket = 327, - item_minecart = 328, - item_saddle = 329, - item_iron_door = 330, - item_redstone = 331, - item_snowball = 332, - item_boat = 333, - item_leather = 334, - item_milk_bucket = 335, - item_brick = 336, - item_clay_ball = 337, - item_reeds = 338, - item_paper = 339, - item_book = 340, - item_slime_ball = 341, - item_chest_minecart = 342, - item_furnace_minecart = 343, - item_egg = 344, - item_compass = 345, - item_fishing_rod = 346, - item_clock = 347, - item_glowstone_dust = 348, - item_fish = 349, - item_cooked_fish = 350, - item_dye = 351, - item_bone = 352, - item_sugar = 353, - item_cake = 354, - item_bed = 355, - item_repeater = 356, - item_cookie = 357, - item_filled_map = 358, - item_shears = 359, - item_melon = 360, - item_pumpkin_seeds = 361, - item_melon_seeds = 362, - item_beef = 363, - item_cooked_beef = 364, - item_chicken = 365, - item_cooked_chicken = 366, - item_rotten_flesh = 367, - item_ender_pearl = 368, - item_blaze_rod = 369, - item_ghast_tear = 370, - item_gold_nugget = 371, - item_nether_wart = 372, - item_potion = 373, - item_glass_bottle = 374, - item_spider_eye = 375, - item_fermented_spider_eye = 376, - item_blaze_powder = 377, - item_magma_cream = 378, - item_brewing_stand = 379, - item_cauldron = 380, - item_ender_eye = 381, - item_speckled_melon = 382, - item_spawn_egg = 383, - item_experience_bottle = 384, - item_fire_charge = 385, - item_writable_book = 386, - item_written_book = 387, - item_emerald = 388, - item_item_frame = 389, - item_flower_pot = 390, - item_carrot = 391, - item_potato = 392, - item_baked_potato = 393, - item_poisonous_potato = 394, - item_map = 395, - item_golden_carrot = 396, - item_skull = 397, - item_carrot_on_a_stick = 398, - item_nether_star = 399, - item_pumpkin_pie = 400, - item_fireworks = 401, - item_firework_charge = 402, - item_enchanted_book = 403, - item_comparator = 404, - item_netherbrick = 405, - item_quartz = 406, - item_tnt_minecart = 407, - item_hopper_minecart = 408, - item_prismarine_shard = 409, - item_prismarine_crystals = 410, - item_rabbit = 411, - item_cooked_rabbit = 412, - item_rabbit_stew = 413, - item_rabbit_foot = 414, - item_rabbit_hide = 415, - item_armor_stand = 416, - item_iron_horse_armor = 417, - item_golden_horse_armor = 418, - item_diamond_horse_armor = 419, - item_lead = 420, - item_name_tag = 421, - item_command_block_minecart = 422, - item_mutton = 423, - item_cooked_mutton = 424, - item_banner = 425, - item_end_crystal = 426, - item_spruce_door = 427, - item_birch_door = 428, - item_jungle_door = 429, - item_acacia_door = 430, - item_dark_oak_door = 431, - item_chorus_fruit = 432, - item_popped_chorus_fruit = 433, - item_beetroot = 434, - item_beetroot_seeds = 435, - item_beetroot_soup = 436, - item_dragon_breath = 437, - item_splash_potion = 438, - item_spectral_arrow = 439, - item_tipped_arrow = 440, - item_lingering_potion = 441, - item_shield = 442, - item_elytra = 443, - item_spruce_boat = 444, - item_birch_boat = 445, - item_jungle_boat = 446, - item_acacia_boat = 447, - item_dark_oak_boat = 448, - item_totem_of_undying = 449, - item_shulker_shell = 450, - item_iron_nugget = 452, - item_knowledge_book = 453, - item_record_13 = 2256, - item_record_cat = 2257, - item_record_blocks = 2258, - item_record_chirp = 2259, - item_record_far = 2260, - item_record_mall = 2261, - item_record_mellohi = 2262, - item_record_stal = 2263, - item_record_strad = 2264, - item_record_ward = 2265, - item_record_11 = 2266, - item_record_wait = 2267 -}; - -typedef uint16_t mc_item_t; -#endif \ No newline at end of file +#ifndef __MC_ID_H_INCLUDED__ +#define __MC_ID_H_INCLUDED__ + +#include + +enum mc_block_id +{ + block_air = 0, + block_stone = 1, + block_grass = 2, + block_dirt = 3, + block_cobblestone = 4, + block_planks = 5, + block_sapling = 6, + block_bedrock = 7, + block_flowing_water = 8, + block_water = 9, + block_flowing_lava = 10, + block_lava = 11, + block_sand = 12, + block_gravel = 13, + block_gold_ore = 14, + block_iron_ore = 15, + block_coal_ore = 16, + block_log = 17, + block_leaves = 18, + block_sponge = 19, + block_glass = 20, + block_lapis_ore = 21, + block_lapis_block = 22, + block_dispenser = 23, + block_sandstone = 24, + block_noteblock = 25, + block_bed = 26, + block_golden_rail = 27, + block_detector_rail = 28, + block_sticky_piston = 29, + block_web = 30, + block_tallgrass = 31, + block_deadbush = 32, + block_piston = 33, + block_piston_head = 34, + block_wool = 35, + block_yellow_flower = 37, + block_red_flower = 38, + block_brown_mushroom = 39, + block_red_mushroom = 40, + block_gold_block = 41, + block_iron_block = 42, + block_double_stone_slab = 43, + block_stone_slab = 44, + block_brick_block = 45, + block_tnt = 46, + block_bookshelf = 47, + block_mossy_cobblestone = 48, + block_obsidian = 49, + block_torch = 50, + block_fire = 51, + block_mob_spawner = 52, + block_oak_stairs = 53, + block_chest = 54, + block_redstone_wire = 55, + block_diamond_ore = 56, + block_diamond_block = 57, + block_crafting_table = 58, + block_wheat = 59, + block_farmland = 60, + block_furnace = 61, + block_lit_furnace = 62, + block_standing_sign = 63, + block_wooden_door = 64, + block_ladder = 65, + block_rail = 66, + block_stone_stairs = 67, + block_wall_sign = 68, + block_lever = 69, + block_stone_pressure_plate = 70, + block_iron_door = 71, + block_wooden_pressure_plate = 72, + block_redstone_ore = 73, + block_lit_redstone_ore = 74, + block_unlit_redstone_torch = 75, + block_redstone_torch = 76, + block_stone_button = 77, + block_snow_layer = 78, + block_ice = 79, + block_snow = 80, + block_cactus = 81, + block_clay = 82, + block_reeds = 83, + block_jukebox = 84, + block_fence = 85, + block_pumpkin = 86, + block_netherrack = 87, + block_soul_sand = 88, + block_glowstone = 89, + block_portal = 90, + block_lit_pumpkin = 91, + block_cake = 92, + block_unpowered_repeater = 93, + block_powered_repeater = 94, + block_stained_glass = 95, + block_trapdoor = 96, + block_monster_egg = 97, + block_stonebrick = 98, + block_brown_mushroom_block = 99, + block_red_mushroom_block = 100, + block_iron_bars = 101, + block_glass_pane = 102, + block_melon_block = 103, + block_pumpkin_stem = 104, + block_melon_stem = 105, + block_vine = 106, + block_fence_gate = 107, + block_brick_stairs = 108, + block_stone_brick_stairs = 109, + block_mycelium = 110, + block_waterlily = 111, + block_nether_brick = 112, + block_nether_brick_fence = 113, + block_nether_brick_stairs = 114, + block_nether_wart = 115, + block_enchanting_table = 116, + block_brewing_stand = 117, + block_cauldron = 118, + block_end_portal = 119, + block_end_portal_frame = 120, + block_end_stone = 121, + block_dragon_egg = 122, + block_redstone_lamp = 123, + block_lit_redstone_lamp = 124, + block_double_wooden_slab = 125, + block_wooden_slab = 126, + block_cocoa = 127, + block_sandstone_stairs = 128, + block_emerald_ore = 129, + block_ender_chest = 130, + block_tripwire_hook = 131, + block_tripwire_wire = 132, + block_emerald_block = 133, + block_spruce_stairs = 134, + block_birch_stairs = 135, + block_jungle_stairs = 136, + block_command_block = 137, + block_beacon = 138, + block_cobblestone_wall = 139, + block_flower_pot = 140, + block_carrots = 141, + block_potatoes = 142, + block_wooden_button = 143, + block_skull = 144, + block_anvil = 145, + block_trapped_chest = 146, + block_light_weighted_pressure_plate = 147, + block_heavy_weighted_pressure_plate = 148, + block_unpowered_comparator = 149, + block_powered_comparator = 150, + block_daylight_detector = 151, + block_redstone_block = 152, + block_quartz_ore = 153, + block_hopper = 154, + block_quartz_block = 155, + block_quartz_stairs = 156, + block_activator_rail = 157, + block_dropper = 158, + block_stained_hardened_clay = 159, + block_stained_glass_pane = 160, + block_leaves2 = 161, + block_log2 = 162, + block_acacia_stairs = 163, + block_dark_oak_stairs = 164, + block_slime = 165, + block_barrier = 166, + block_iron_trapdoor = 167, + block_prismarine = 168, + block_sea_lantern = 169, + block_hay_block = 170, + block_carpet = 171, + block_hardened_clay = 172, + block_coal_block = 173, + block_packed_ice = 174, + block_double_plant = 175, + block_standing_banner = 176, + block_wall_banner = 177, + block_daylight_detector_inverted = 178, + block_red_sandstone = 179, + block_red_sandstone_stairs = 180, + block_double_stone_slab2 = 181, + block_stone_slab2 = 182, + block_spruce_fence_gate = 183, + block_birch_fence_gate = 184, + block_jungle_fence_gate = 185, + block_dark_oak_fence_gate = 186, + block_acacia_fence_gate = 187, + block_spruce_fence = 188, + block_birch_fence = 189, + block_jungle_fence = 190, + block_dark_oak_fence = 191, + block_acacia_fence = 192, + block_spruce_door = 193, + block_birch_door = 194, + block_jungle_door = 195, + block_acacia_door = 196, + block_dark_oak_door = 197, + block_end_rod = 198, + block_chorus_plant = 199, + block_chorus_flower = 200, + block_purpur_block = 201, + block_purpur_pillar = 202, + block_purpur_stairs = 203, + block_purpur_double_slab = 204, + block_purpur_slab = 205, + block_end_bricks = 206, + block_beetroots = 207, + block_grass_path = 208, + block_end_gateway = 209, + block_repeating_command_block = 210, + block_chain_command_block = 211, + block_frosted_ice = 212, + block_magma = 213, + block_nether_wart_block = 214, + block_red_nether_brick = 215, + block_bone_block = 216, + block_structure_void = 217, + block_observer = 218, + block_white_shulker_box = 219, + block_orange_shulker_box = 220, + block_magenta_shulker_box = 221, + block_light_blue_shulker_box = 222, + block_yellow_shulker_box = 223, + block_lime_shulker_box = 224, + block_pink_shulker_box = 225, + block_gray_shulker_box = 226, + block_silver_shulker_box = 227, + block_cyan_shulker_box = 228, + block_purple_shulker_box = 229, + block_blue_shulker_box = 230, + block_brown_shulker_box = 231, + block_green_shulker_box = 232, + block_red_shulker_box = 233, + block_black_shulker_box = 234, + block_white_glazed_terracotta = 235, + block_orange_glazed_terracotta = 236, + block_magenta_glazed_terracotta = 237, + block_light_blue_glazed_terracotta = 238, + block_yellow_glazed_terracotta = 239, + block_lime_glazed_terracotta = 240, + block_pink_glazed_terracotta = 241, + block_gray_glazed_terracotta = 242, + block_light_gray_glazed_terracotta = 243, + block_cyan_glazed_terracotta = 244, + block_purple_glazed_terracotta = 245, + block_blue_glazed_terracotta = 246, + block_brown_glazed_terracotta = 247, + block_green_glazed_terracotta = 248, + block_red_glazed_terracotta = 249, + block_black_glazed_terracotta = 250, + 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; + + +enum mc_item_id +{ + item_iron_shovel = 256, + item_iron_pickaxe = 257, + item_iron_axe = 258, + item_flint_and_steel = 259, + item_apple = 260, + item_bow = 261, + item_arrow = 262, + item_coal = 263, + item_diamond = 264, + item_iron_ingot = 265, + item_gold_ingot = 266, + item_iron_sword = 267, + item_wooden_sword = 268, + item_wooden_shovel = 269, + item_wooden_pickaxe = 270, + item_wooden_axe = 271, + item_stone_sword = 272, + item_stone_shovel = 273, + item_stone_pickaxe = 274, + item_stone_axe = 275, + item_diamond_sword = 276, + item_diamond_shovel = 277, + item_diamond_pickaxe = 278, + item_diamond_axe = 279, + item_stick = 280, + item_bowl = 281, + item_mushroom_stew = 282, + item_golden_sword = 283, + item_golden_shovel = 284, + item_golden_pickaxe = 285, + item_golden_axe = 286, + item_string = 287, + item_feather = 288, + item_gunpowder = 289, + item_wooden_hoe = 290, + item_stone_hoe = 291, + item_iron_hoe = 292, + item_diamond_hoe = 293, + item_golden_hoe = 294, + item_wheat_seeds = 295, + item_wheat = 296, + item_bread = 297, + item_leather_helmet = 298, + item_leather_chestplate = 299, + item_leather_leggings = 300, + item_leather_boots = 301, + item_chainmail_helmet = 302, + item_chainmail_chestplate = 303, + item_chainmail_leggings = 304, + item_chainmail_boots = 305, + item_iron_helmet = 306, + item_iron_chestplate = 307, + item_iron_leggings = 308, + item_iron_boots = 309, + item_diamond_helmet = 310, + item_diamond_chestplate = 311, + item_diamond_leggings = 312, + item_diamond_boots = 313, + item_golden_helmet = 314, + item_golden_chestplate = 315, + item_golden_leggings = 316, + item_golden_boots = 317, + item_flint = 318, + item_porkchop = 319, + item_cooked_porkchop = 320, + item_painting = 321, + item_golden_apple = 322, + item_sign = 323, + item_wooden_door = 324, + item_bucket = 325, + item_water_bucket = 326, + item_lava_bucket = 327, + item_minecart = 328, + item_saddle = 329, + item_iron_door = 330, + item_redstone = 331, + item_snowball = 332, + item_boat = 333, + item_leather = 334, + item_milk_bucket = 335, + item_brick = 336, + item_clay_ball = 337, + item_reeds = 338, + item_paper = 339, + item_book = 340, + item_slime_ball = 341, + item_chest_minecart = 342, + item_furnace_minecart = 343, + item_egg = 344, + item_compass = 345, + item_fishing_rod = 346, + item_clock = 347, + item_glowstone_dust = 348, + item_fish = 349, + item_cooked_fish = 350, + item_dye = 351, + item_bone = 352, + item_sugar = 353, + item_cake = 354, + item_bed = 355, + item_repeater = 356, + item_cookie = 357, + item_filled_map = 358, + item_shears = 359, + item_melon = 360, + item_pumpkin_seeds = 361, + item_melon_seeds = 362, + item_beef = 363, + item_cooked_beef = 364, + item_chicken = 365, + item_cooked_chicken = 366, + item_rotten_flesh = 367, + item_ender_pearl = 368, + item_blaze_rod = 369, + item_ghast_tear = 370, + item_gold_nugget = 371, + item_nether_wart = 372, + item_potion = 373, + item_glass_bottle = 374, + item_spider_eye = 375, + item_fermented_spider_eye = 376, + item_blaze_powder = 377, + item_magma_cream = 378, + item_brewing_stand = 379, + item_cauldron = 380, + item_ender_eye = 381, + item_speckled_melon = 382, + item_spawn_egg = 383, + item_experience_bottle = 384, + item_fire_charge = 385, + item_writable_book = 386, + item_written_book = 387, + item_emerald = 388, + item_item_frame = 389, + item_flower_pot = 390, + item_carrot = 391, + item_potato = 392, + item_baked_potato = 393, + item_poisonous_potato = 394, + item_map = 395, + item_golden_carrot = 396, + item_skull = 397, + item_carrot_on_a_stick = 398, + item_nether_star = 399, + item_pumpkin_pie = 400, + item_fireworks = 401, + item_firework_charge = 402, + item_enchanted_book = 403, + item_comparator = 404, + item_netherbrick = 405, + item_quartz = 406, + item_tnt_minecart = 407, + item_hopper_minecart = 408, + item_prismarine_shard = 409, + item_prismarine_crystals = 410, + item_rabbit = 411, + item_cooked_rabbit = 412, + item_rabbit_stew = 413, + item_rabbit_foot = 414, + item_rabbit_hide = 415, + item_armor_stand = 416, + item_iron_horse_armor = 417, + item_golden_horse_armor = 418, + item_diamond_horse_armor = 419, + item_lead = 420, + item_name_tag = 421, + item_command_block_minecart = 422, + item_mutton = 423, + item_cooked_mutton = 424, + item_banner = 425, + item_end_crystal = 426, + item_spruce_door = 427, + item_birch_door = 428, + item_jungle_door = 429, + item_acacia_door = 430, + item_dark_oak_door = 431, + item_chorus_fruit = 432, + item_popped_chorus_fruit = 433, + item_beetroot = 434, + item_beetroot_seeds = 435, + item_beetroot_soup = 436, + item_dragon_breath = 437, + item_splash_potion = 438, + item_spectral_arrow = 439, + item_tipped_arrow = 440, + item_lingering_potion = 441, + item_shield = 442, + item_elytra = 443, + item_spruce_boat = 444, + item_birch_boat = 445, + item_jungle_boat = 446, + item_acacia_boat = 447, + item_dark_oak_boat = 448, + item_totem_of_undying = 449, + item_shulker_shell = 450, + item_iron_nugget = 452, + item_knowledge_book = 453, + item_record_13 = 2256, + item_record_cat = 2257, + item_record_blocks = 2258, + item_record_chirp = 2259, + item_record_far = 2260, + item_record_mall = 2261, + item_record_mellohi = 2262, + item_record_stal = 2263, + item_record_strad = 2264, + item_record_ward = 2265, + item_record_11 = 2266, + item_record_wait = 2267 +}; + +typedef uint16_t mc_item_t; +#endif diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index 4eedda6..9a9a924 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -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 diff --git a/overviewer_core/src/primitives/lighting.c b/overviewer_core/src/primitives/lighting.c index b08d6a1..4c48327 100644 --- a/overviewer_core/src/primitives/lighting.c +++ b/overviewer_core/src/primitives/lighting.c @@ -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); diff --git a/overviewer_core/textures.py b/overviewer_core/textures.py index b2485d0..7ced6fa 100644 --- a/overviewer_core/textures.py +++ b/overviewer_core/textures.py @@ -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() diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 8660e07..873f477 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -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',