diff --git a/docs/config.rst b/docs/config.rst index 7a3e549..a2f3f93 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -365,7 +365,7 @@ values. The valid configuration keys are listed below. Then you don't need to specify a ``world`` key in the render dictionaries:: - render['arender'] = { + renders['arender'] = { 'title': 'This render doesn't explicitly declare a world!', } @@ -928,7 +928,7 @@ primitive object's constructor:: Then you can use your new rendermode in your render definitions:: - render["survivalday"] = { + renders["survivalday"] = { "world": "survival", "title": "Survival Daytime", "rendermode": my_rendermode, diff --git a/docs/faq.rst b/docs/faq.rst index 2efb5c8..9e9b8a8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -219,7 +219,7 @@ into your config. In your config, do the following # all the usual config stuff goes here - render["myrender"] = { + renders["myrender"] = { "title" : "foo", "world" : "someworld", "manualpois" : mymarkers, # IMPORTANT! Variable name from manualmarkers.py diff --git a/docs/signs.rst b/docs/signs.rst index 9bf8e0f..6490230 100644 --- a/docs/signs.rst +++ b/docs/signs.rst @@ -147,10 +147,12 @@ Here is a more complex example where not every marker of a certain id has a cert 'y':85, 'z':-234, 'name':'Bar'}], - 'markers': [dict(name="Towns", filterFunction=townFilter, icon="town.png")], + 'markers': [dict(name="Towns", filterFunction=townFilter, icon="icons/marker_town.png")], ### Note: The 'icon' parameter allows you to specify a custom icon, as per ### standard markers. This icon must exist in the same folder as your ### custom webassets or in the same folder as the generated index.html + ### in this case, we use the marker_town.png icon which comes with + ### the Overviewer by default, located in a subdirectory of web_assets. } @@ -235,3 +237,12 @@ Predefined Filter Functions TODO write some filter functions, then document them here +Marker Icons Overviewer ships by default +======================================== + +Overviewer comes with multiple small icons that you can use for your markers. +You can find them in the ``overviewer_core/data/web_assets/icons`` directory. + +If you want to make your own in the same style, you can use the provided +``marker_base_plain.svg`` and ``marker_base_plain_red.svg`` as template, with +a vector editing software such as `Inkscape `_. diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index 45e36ff..bc71b5b 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -167,7 +167,7 @@ def main(): rset = w.get_regionset(render['dimension'][1]) if rset == None: # indicates no such dimension was found: - logging.error("Sorry, you requested dimension '%s' for %s, but I couldn't find it", render['dimension'][0], render_name) + logging.error("Sorry, you requested dimension '%s' for the render '%s', but I couldn't find it", render['dimension'][0], rname) return 1 for f in render['markers']: diff --git a/overviewer_core/data/web_assets/icons/marker_anvil.png b/overviewer_core/data/web_assets/icons/marker_anvil.png new file mode 100644 index 0000000..a50b487 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_anvil.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_anvil_red.png b/overviewer_core/data/web_assets/icons/marker_anvil_red.png new file mode 100644 index 0000000..1b5f203 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_anvil_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_base_plain.svg b/overviewer_core/data/web_assets/icons/marker_base_plain.svg new file mode 100644 index 0000000..ed7bd84 --- /dev/null +++ b/overviewer_core/data/web_assets/icons/marker_base_plain.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/overviewer_core/data/web_assets/icons/marker_base_plain_red.svg b/overviewer_core/data/web_assets/icons/marker_base_plain_red.svg new file mode 100644 index 0000000..a89ec26 --- /dev/null +++ b/overviewer_core/data/web_assets/icons/marker_base_plain_red.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/overviewer_core/data/web_assets/icons/marker_factory.png b/overviewer_core/data/web_assets/icons/marker_factory.png new file mode 100644 index 0000000..55914c2 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_factory.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_factory_red.png b/overviewer_core/data/web_assets/icons/marker_factory_red.png new file mode 100644 index 0000000..bf71106 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_factory_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_hoe.png b/overviewer_core/data/web_assets/icons/marker_hoe.png new file mode 100644 index 0000000..f99c3f7 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_hoe.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_hoe_red.png b/overviewer_core/data/web_assets/icons/marker_hoe_red.png new file mode 100644 index 0000000..60ef117 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_hoe_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_mine.png b/overviewer_core/data/web_assets/icons/marker_mine.png new file mode 100644 index 0000000..f03eea2 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_mine.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_mine_red.png b/overviewer_core/data/web_assets/icons/marker_mine_red.png new file mode 100644 index 0000000..e88378b Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_mine_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_ship.png b/overviewer_core/data/web_assets/icons/marker_ship.png new file mode 100644 index 0000000..9b349a1 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_ship.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_ship_red.png b/overviewer_core/data/web_assets/icons/marker_ship_red.png new file mode 100644 index 0000000..a2fe0a9 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_ship_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_tower.png b/overviewer_core/data/web_assets/icons/marker_tower.png new file mode 100644 index 0000000..2f4f7b5 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_tower.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_tower_red.png b/overviewer_core/data/web_assets/icons/marker_tower_red.png new file mode 100644 index 0000000..d014222 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_tower_red.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_town.png b/overviewer_core/data/web_assets/icons/marker_town.png new file mode 100644 index 0000000..145cca8 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_town.png differ diff --git a/overviewer_core/data/web_assets/icons/marker_town_red.png b/overviewer_core/data/web_assets/icons/marker_town_red.png new file mode 100644 index 0000000..94a7118 Binary files /dev/null and b/overviewer_core/data/web_assets/icons/marker_town_red.png differ diff --git a/overviewer_core/data/web_assets/index.html b/overviewer_core/data/web_assets/index.html index 8b25b03..1408efa 100644 --- a/overviewer_core/data/web_assets/index.html +++ b/overviewer_core/data/web_assets/index.html @@ -23,6 +23,11 @@ -
+
+
+ If you can see this message, there is likely a problem loading the Overviewer javascript components. + Check the javascript console for error messages. +
+
diff --git a/overviewer_core/items.py b/overviewer_core/items.py index 9b01aed..77923e6 100644 --- a/overviewer_core/items.py +++ b/overviewer_core/items.py @@ -1,207 +1,341 @@ items = { 0: 'Air', 1: 'Stone', - 2: 'Grass', + 2: 'Grass Block', 3: 'Dirt', 4: 'Cobblestone', - 5: 'Wooden plank', + 5: 'Wooden Planks', 6: 'Sapling', 7: 'Bedrock', 8: 'Water', - 9: 'Stationary', + 9: 'Stationary Water', 10: 'Lava', - 11: 'Stationary', + 11: 'Stationary Lava', 12: 'Sand', 13: 'Gravel', - 14: 'Gold ore', - 15: 'Iron ore', - 16: 'Coal ore', + 14: 'Gold Ore', + 15: 'Iron Ore', + 16: 'Coal Ore', 17: 'Wood', 18: 'Leaves', 19: 'Sponge', 20: 'Glass', - 21: 'Lapis lazuli ore', - 22: 'Lapis lazuli block', + 21: 'Lapis Lazuli Ore', + 22: 'Lapis Lazuli Block', 23: 'Dispenser', 24: 'Sandstone', - 25: 'Note block', + 25: 'Note Block', 26: 'Bed', - 27: 'Powered rail', - 28: 'Detector rail', - 29: 'Sticky piston', + 27: 'Powered Rail', + 28: 'Detector Rail', + 29: 'Sticky Piston', 30: 'Cobweb', - 31: 'Tall grass', - 32: 'Dead shrubs', + 31: 'Shrub', + 32: 'Dead Bush', 33: 'Piston', - 34: 'Piston extension', + 34: 'Piston Extension', 35: 'Wool', - 36: 'Block moved by piston', + 36: 'Block moved by Piston', 37: 'Dandelion', - 38: 'Rose', - 39: 'Brown mushroom', - 40: 'Red mushroom', - 41: 'Block of gold', - 42: 'Block of iron', - 43: 'Double slabs', - 44: 'Slabs', - 45: 'Brick block', + 38: 'Poppy', + 39: 'Brown Mushroom', + 40: 'Red Mushroom', + 41: 'Block of Gold', + 42: 'Block of Iron', + 43: 'Double Stone Slab', + 44: 'Stone Slab', + 45: 'Bricks', 46: 'TNT', 47: 'Bookshelf', - 48: 'Moss stone', + 48: 'Moss Stone', 49: 'Obsidian', 50: 'Torch', 51: 'Fire', - 52: 'Monster spawner', - 53: 'Wooden stairs', + 52: 'Monster Spawner', + 53: 'Oak Wood Stairs', 54: 'Chest', 55: 'Redstone wire', 56: 'Diamond ore', - 57: 'Block of diamond', - 58: 'Crafting table', - 59: 'Seeds', + 57: 'Block of Diamond', + 58: 'Crafting Table', + 59: 'Crops', 60: 'Farmland', 61: 'Furnace', 62: 'Burning furnace', 63: 'Sign', 64: 'Wooden door', - 65: 'Ladders', - 66: 'Rails', - 67: 'Cobblestone stairs', + 65: 'Ladder', + 66: 'Rail', + 67: 'Cobblestone Stairs', 68: 'Wall sign', 69: 'Lever', - 70: 'Stone pressure plate', + 70: 'Stone Pressure Plate', 71: 'Iron door', - 72: 'Wooden pressure plate', - 73: 'Redstone ore', - 74: 'Glowing redstone ore', - 75: 'Redstone torch (off)', - 76: 'Redstone torch (on)', - 77: 'Stone button', + 72: 'Wooden Pressure Plate', + 73: 'Redstone Ore', + 74: 'Glowing Redstone Ore', + 75: 'Redstone Torch (off)', + 76: 'Redstone Torch (on)', + 77: 'Stone Button', 78: 'Snow', 79: 'Ice', - 80: 'Snow block', + 80: 'Snow Block', 81: 'Cactus', - 82: 'Clay block', - 83: 'Sugar cane', + 82: 'Clay Block', + 83: 'Sugar Cane', 84: 'Jukebox', 85: 'Fence', 86: 'Pumpkin', 87: 'Netherrack', - 88: 'Soul sand', - 89: 'Glowstone block', - 90: 'Portal', - 91: 'Jack-O-Lantern', + 88: 'Soul Sand', + 89: 'Glowstone', + 90: 'Nether Portal', + 91: 'Jack o\'Lantern', 92: 'Cake', - 93: 'Redstone repeater (off)', - 94: 'Redstone repeater (on)', - 95: 'Locked', + 93: 'Redstone Repeater (off)', + 94: 'Redstone Repeater (on)', + 95: 'Locked Chest', 96: 'Trapdoor', - 256: 'Iron shovel', - 257: 'Iron pickaxe', - 258: 'Iron axe', - 259: 'Flint and steel', - 260: 'Red apple', + 97: 'Monster Egg', + 98: 'Stone Bricks', + 99: 'Huge Brown Mushroom', + 100: 'Huge Red Mushroom', + 101: 'Iron Bars', + 102: 'Glass Pane', + 103: 'Melon', + 104: 'Pumpkin Stem', + 105: 'Melon Stem', + 106: 'Vines', + 107: 'Fence Gate', + 108: 'Brick Stairs', + 109: 'Stone Brick Stairs', + 110: 'Mycelium', + 111: 'Lily Pad', + 112: 'Nether Brick', + 113: 'Nether Brick Fence', + 114: 'Nether Brick Stairs', + 115: 'Nether Wart', + 116: 'Enchantment Table', + 117: 'Brewing Stand', + 118: 'Cauldron', + 119: 'End Portal', + 120: 'End Portal Block', + 121: 'End Stone', + 122: 'Dragon Egg', + 123: 'Redstone Lamp (off)', + 124: 'Redstone Lamp (on)', + 125: 'Double Wooden Slab', + 126: 'Wooden Slab', + 127: 'Cocoa', + 128: 'Sandstone Stairs', + 129: 'Emerald Ore', + 130: 'Ender Chest', + 131: 'Tripwire Hook', + 132: 'Tripwire', + 133: 'Block of Emerald', + 134: 'Spruce Wood Stairs', + 135: 'Birch Wood Stairs', + 136: 'Jungle Wood Stairs', + 137: 'Command Block', + 138: 'Beacon', + 139: 'Cobblestone Wall', + 140: 'Flower Pot', + 141: 'Carrots', + 142: 'Potatoes', + 143: 'Wooden Button', + 144: 'Mob Head', + 145: 'Anvil', + 146: 'Trapped Chest', + 147: 'Weighted Pressure Plate (Light)', + 148: 'Weighted Pressure Plate (Heavy)', + 149: 'Redstone Comparator (off)', + 150: 'Redstone Comparator (on)', + 151: 'Daylight Sensor', + 152: 'Block of Redstone', + 153: 'Nether Quartz Ore', + 154: 'Hopper', + 155: 'Block of Quartz', + 156: 'Quartz Stairs', + 157: 'Activator Rail', + 158: 'Dropper', + 159: 'Stained Clay', + 170: 'Hay Block', + 171: 'Carpet', + 172: 'Hardened Clay', + 173: 'Block of Coal', + 174: 'Packed Ice', + 175: 'Large Flowers', + 256: 'Iron Shovel', + 257: 'Iron Pickaxe', + 258: 'Iron Axe', + 259: 'Flint and Steel', + 260: 'Apple', 261: 'Bow', 262: 'Arrow', 263: 'Coal', 264: 'Diamond', - 265: 'Iron ingot', - 266: 'Gold ingot', - 267: 'Iron sword', - 268: 'Wooden sword', - 269: 'Wooden shovel', - 270: 'Wooden pickaxe', - 271: 'Wooden axe', - 272: 'Stone sword', - 273: 'Stone shovel', - 274: 'Stone pickaxe', - 275: 'Stone axe', - 276: 'Diamond sword', - 277: 'Diamond shovel', - 278: 'Diamond pickaxe', - 279: 'Diamond axe', + 265: 'Iron Ingot', + 266: 'Gold Ingot', + 267: 'Iron Sword', + 268: 'Wooden Sword', + 269: 'Wooden Shovel', + 270: 'Wooden Pickaxe', + 271: 'Wooden Axe', + 272: 'Stone Sword', + 273: 'Stone Shovel', + 274: 'Stone Pickaxe', + 275: 'Stone Axe', + 276: 'Diamond Sword', + 277: 'Diamond Shovel', + 278: 'Diamond Pickaxe', + 279: 'Diamond Axe', 280: 'Stick', 281: 'Bowl', - 282: 'Mushroom soup', - 283: 'Gold sword', - 284: 'Gold shovel', - 285: 'Gold pickaxe', - 286: 'Gold axe', + 282: 'Mushroom Stew', + 283: 'Gold Sword', + 284: 'Gold Shovel', + 285: 'Gold Pickaxe', + 286: 'Gold Axe', 287: 'String', 288: 'Feather', 289: 'Gunpowder', - 290: 'Wooden hoe', - 291: 'Stone hoe', - 292: 'Iron hoe', - 293: 'Diamond hoe', - 294: 'Gold hoe', + 290: 'Wooden Hoe', + 291: 'Stone Hoe', + 292: 'Iron Hoe', + 293: 'Diamond Hoe', + 294: 'Gold Hoe', 295: 'Seeds', 296: 'Wheat', 297: 'Bread', - 298: 'Leather cap', - 299: 'Leather tunic', - 300: 'Leather pants', - 301: 'Leather boots', - 302: 'Chain helmet', - 303: 'Chain chestplate', - 304: 'Chain leggings', - 305: 'Chain boots', - 306: 'Iron helmet', - 307: 'Iron chestplate', - 308: 'Iron leggings', - 309: 'Iron boots', - 310: 'Diamond helmet', - 311: 'Diamond chestplate', - 312: 'Diamond leggings', - 313: 'Diamond boots', - 314: 'Gold helmet', - 315: 'Gold chestplate', - 316: 'Gold leggings', - 317: 'Gold boots', + 298: 'Leather Cap', + 299: 'Leather Tunic', + 300: 'Leather Pants', + 301: 'Leather Boots', + 302: 'Chain Helmet', + 303: 'Chain Chestplate', + 304: 'Chain Leggings', + 305: 'Chain Boots', + 306: 'Iron Helmet', + 307: 'Iron Chestplate', + 308: 'Iron Leggings', + 309: 'Iron Boots', + 310: 'Diamond Helmet', + 311: 'Diamond Chestplate', + 312: 'Diamond Leggings', + 313: 'Diamond Boots', + 314: 'Gold Helmet', + 315: 'Gold Chestplate', + 316: 'Gold Leggings', + 317: 'Gold Boots', 318: 'Flint', - 319: 'Raw porkchop', - 320: 'Cooked porkchop', - 321: 'Paintings', - 322: 'Golden apple', + 319: 'Raw Porkchop', + 320: 'Cooked Porkchop', + 321: 'Painting', + 322: 'Golden Apple', 323: 'Sign', - 324: 'Wooden door', + 324: 'Wooden Door', 325: 'Bucket', - 326: 'Water bucket', - 327: 'Lava bucket', + 326: 'Water Bucket', + 327: 'Lava Bucket', 328: 'Minecart', 329: 'Saddle', - 330: 'Iron door', + 330: 'Iron Door', 331: 'Redstone', 332: 'Snowball', 333: 'Boat', 334: 'Leather', 335: 'Milk', - 336: 'Clay brick', + 336: 'Brick', 337: 'Clay', - 338: 'Sugar cane', + 338: 'Sugar Canes', 339: 'Paper', 340: 'Book', 341: 'Slimeball', - 342: 'Minecart with chest', - 343: 'Minecart with furnace', + 342: 'Minecart with Chest', + 343: 'Minecart with Furnace', 344: 'Egg', 345: 'Compass', - 346: 'Fishing rod', + 346: 'Fishing Rod', 347: 'Clock', - 348: 'Glowstone dust', - 349: 'Raw fish', - 350: 'Cooked fish', + 348: 'Glowstone Dust', + 349: 'Raw Fish', + 350: 'Cooked Fish', 351: 'Dye', 352: 'Bone', 353: 'Sugar', 354: 'Cake', 355: 'Bed', - 356: 'Redstone repeater', + 356: 'Redstone Repeater', 357: 'Cookie', 358: 'Map', 359: 'Shears', - 2256: 'Gold music disc', - 2257: 'Green music disc' + 360: 'Melon', + 361: 'Pumpkin Seeds', + 362: 'Melon Seeds', + 363: 'Raw Beef', + 364: 'Steak', + 365: 'Raw Chicken', + 366: 'Cooked Chicken', + 367: 'Rotten Flesh', + 368: 'Ender Pearl', + 369: 'Blaze Rod', + 370: 'Ghast Tear', + 371: 'Gold Nugget', + 372: 'Nether Wart', + 373: 'Water Bottle / Potion', + 374: 'Glass Bottle', + 375: 'Spider Eye', + 376: 'Fermented Spider Eye', + 377: 'Blaze Powder', + 378: 'Magma Cream', + 379: 'Brewing Stand', + 380: 'Cauldron', + 381: 'Eye of Ender', + 382: 'Glistering Melon', + 383: 'Spawn Egg', + 384: 'Bottle o\' Enchanting', + 385: 'Fire Charge', + 386: 'Book and Quill', + 387: 'Written Book', + 388: 'Emerald', + 389: 'Item Frame', + 390: 'Flower Pot', + 391: 'Carrot', + 392: 'Potato', + 393: 'Baked Potato', + 394: 'Poisonous Potato', + 395: 'Empty Map', + 396: 'Golden Carrot', + 397: 'Mob Head', + 398: 'Carrot on a Stick', + 399: 'Nether Star', + 400: 'Pumpkin Pie', + 401: 'Firework Rocket', + 402: 'Firework Star', + 403: 'Enchanted Book', + 404: 'Redstone Comparator', + 405: 'Nether Brick', + 406: 'Nether Quartz', + 407: 'Minecart with TNT', + 408: 'Minecart with Hopper', + 417: 'Iron Horse Armor', + 418: 'Gold Horse Armor', + 419: 'Diamond Horse Armor', + 420: 'Lead', + 421: 'Name Tag', + 422: 'Minecart with Command Block', + 2256: 'C418 - 13 Music Disc', + 2257: 'C418 - Cat Music Disc', + 2258: 'C418 - blocks Music Disc', + 2259: 'C418 - chirp Music Disc', + 2260: 'C418 - far Music Disc', + 2261: 'C418 - mall Music Disc', + 2262: 'C418 - mellohi Music Disc', + 2263: 'C418 - stal Music Disc', + 2264: 'C418 - strad Music Disc', + 2265: 'C418 - ward Music Disc', + 2266: 'C418 - 11 Music Disc', + 2267: 'C418 - wait Music Disc', } def id2item(item_id): diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index e20c15f..75d2894 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -147,6 +147,7 @@ block_has_property(unsigned short b, BlockProperty prop) { return block_properties[b] & (1 << prop); } #define is_transparent(b) block_has_property((b), TRANSPARENT) +#define is_known_transparent(b) block_has_property((b), TRANSPARENT) && block_has_property((b), KNOWN) /* helper for indexing section data possibly across section boundaries */ typedef enum diff --git a/overviewer_core/src/primitives/cave.c b/overviewer_core/src/primitives/cave.c index 064f498..c89ccfc 100644 --- a/overviewer_core/src/primitives/cave.c +++ b/overviewer_core/src/primitives/cave.c @@ -43,9 +43,9 @@ cave_occluded(void *data, RenderState *state, int x, int y, int z) { /* check for normal occlusion */ /* use ajacent chunks, if not you get blocks spreaded in chunk edges */ - if (!is_transparent(get_data(state, BLOCKS, x-1, y, z)) && - !is_transparent(get_data(state, BLOCKS, x, y, z+1)) && - !is_transparent(get_data(state, BLOCKS, x, y+1, z))) { + if (!is_known_transparent(get_data(state, BLOCKS, x-1, y, z)) && + !is_known_transparent(get_data(state, BLOCKS, x, y, z+1)) && + !is_known_transparent(get_data(state, BLOCKS, x, y+1, z))) { return 1; }