-
-
Save TomLewis/9a7e25a81cd50622b79d6031c518c09c to your computer and use it in GitHub Desktop.
Add these functions, filters and manual POIs to your overviewer config file to add a mca file grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pointDict( coords ): | |
coordLabel = ("x", "y", "z") | |
return dict(zip(coordLabel, coords)) | |
def mcafilter(poi): | |
if poi["id"] == "mca": | |
# print poi | |
return poi | |
mcapoi = [] | |
for x in xrange(-20, 21): | |
for z in xrange(-20, 21): | |
x1 = x * 512 | |
z1 = z * 512 | |
bl = (x1, 64, z1) | |
tl = (x1 + 511, 64, z1) | |
tr = (x1 + 511, 64, z1+ 511) | |
br = (x1, 64, z1 + 511) | |
square = [bl, tl, tr, br, bl] | |
poi = dict(text = "r." + str(x) + "." + str(z) + ".mca", | |
id = "mca", | |
color = "red" if (x % 2 or z % 2) else "red", | |
x = x1+256, | |
y = 64, | |
z = z1 +256, | |
polyline=tuple([pointDict( coords) for coords in square])) | |
mcapoi.append(poi) | |
markers += [ dict(name="mca file", icon="", filterFunction=mcafilter, createInfoWindow=True, checked=True) ] | |
overmanualpois += mcapoi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment