0

Merge branch 'master' of git://github.com/overviewer/Minecraft-Overviewer

This commit is contained in:
joe-mojo
2013-10-08 23:55:09 +02:00
24 changed files with 418 additions and 129 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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 <http://inkscape.org>`_.

View File

@@ -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']:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="32"
height="37"
id="svg2">
<defs
id="defs4">
<filter
x="-0.25"
y="-0.25"
width="1.5"
height="1.5"
id="filter3802">
<feGaussianBlur
result="blur"
stdDeviation="2"
in="SourceAlpha"
id="feGaussianBlur3804" />
<feColorMatrix
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0 "
type="matrix"
result="bluralpha"
id="feColorMatrix3806" />
<feOffset
result="offsetBlur"
dy="0"
dx="0"
in="bluralpha"
id="feOffset3808" />
<feMerge
id="feMerge3810">
<feMergeNode
in="offsetBlur"
id="feMergeNode3812" />
<feMergeNode
in="SourceGraphic"
id="feMergeNode3814" />
</feMerge>
</filter>
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-1015.3622)"
id="layer1">
<path
d="m 5.3953731,1018.8294 c -1.0681842,0 -1.928114,0.8381 -1.928114,1.8793 l 0,20.6699 c 0,1.0409 0.8599298,1.879 1.928114,1.879 l 4.3382568,0 5.7843411,5.6373 0.964058,0 5.784341,-5.6373 4.338257,0 c 1.068185,0 1.928114,-0.8381 1.928114,-1.879 l 0,-20.6699 c 0,-1.0412 -0.859929,-1.8793 -1.928114,-1.8793 l -21.2092539,0 z"
id="rect2987"
style="fill:#6e68e3;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3802)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="32"
height="37"
id="svg2">
<defs
id="defs4">
<filter
x="-0.25"
y="-0.25"
width="1.5"
height="1.5"
id="filter3802">
<feGaussianBlur
result="blur"
stdDeviation="2"
in="SourceAlpha"
id="feGaussianBlur3804" />
<feColorMatrix
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0 "
type="matrix"
result="bluralpha"
id="feColorMatrix3806" />
<feOffset
result="offsetBlur"
dy="0"
dx="0"
in="bluralpha"
id="feOffset3808" />
<feMerge
id="feMerge3810">
<feMergeNode
in="offsetBlur"
id="feMergeNode3812" />
<feMergeNode
in="SourceGraphic"
id="feMergeNode3814" />
</feMerge>
</filter>
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-1015.3622)"
id="layer1">
<path
d="m 5.4024076,1018.8378 c -1.0674758,0 -1.926835,0.8375 -1.926835,1.878 l 0,20.6586 c 0,1.0404 0.8593592,1.8781 1.926835,1.8781 l 4.3353787,0 5.7805047,5.6341 0.963418,0 5.780506,-5.6341 4.335377,0 c 1.067477,0 1.926836,-0.8377 1.926836,-1.8781 l 0,-20.6586 c 0,-1.0405 -0.859359,-1.878 -1.926836,-1.878 l -21.1951844,0 z"
id="rect2987"
style="fill:#de634e;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3802)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -23,6 +23,11 @@
<!-- Generated at: {time} -->
<body onload="overviewer.util.initialize()">
<div id="mcmap"></div>
<div id="mcmap">
<div id="NoJSWarning" style="color:white; background-color:black">
If you can see this message, there is likely a problem loading the Overviewer javascript components.
Check the javascript console for error messages.
</div>
</div>
</body>
</html>

View File

@@ -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):

View File

@@ -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

View File

@@ -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;
}