Skip to content

Instantly share code, notes, and snippets.

@cnaude
Created February 27, 2017 12:47
Show Gist options
  • Save cnaude/2dce8a24b22243785f3d027a2933eb78 to your computer and use it in GitHub Desktop.
Save cnaude/2dce8a24b22243785f3d027a2933eb78 to your computer and use it in GitHub Desktop.
Overviewer Configuration for Aardvark MC
# vim: set filetype=python:
def townFilter(poi):
if poi['id'] == 'Town':
return poi['name']
def signFilter(poi):
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
if poi['Text1'].startswith('Image:'):
poi['icon'] = "painting_icon.png"
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://imgur.com/{id}.png' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:])
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']])
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
if poi['Text1'].startswith('POI:'):
return "\n".join([poi['Text2'], poi['Text3'], poi['Text4']])
def playerFilter(poi):
if poi["id"] == "Player":
poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']
info = "[%s] \n %s \n" % (poi["id"], poi["EntityId"])
info += "Health: %i\tFood: %i \n" % (poi["Health"], poi["foodLevel"])
item_sum = 0
for item in poi["Inventory"]:
item_sum += item["Count"]
info += "%i items" % item_sum
return info
elif poi["id"] == "PlayerSpawn":
poi['icon'] = "bed.png"
return "[%s] \n %s \n" % (poi["id"], poi["EntityId"])
worlds["overworld"] = "/games/aardmc/world"
worlds["nether"] = "/games/aardmc/world_nether"
worlds["end"] = "/games/aardmc/world_the_end"
zoom = 6
outputdir = "/games/aardmcmap"
signs = {'name': "Signs", 'filterFunction': signFilter}
towns = {'name': "Landmarks", 'filterFunction': townFilter}
players = {'name': "Players", 'filterFunction': playerFilter}
pois = [
{'id':'Town',
'x':161,
'y':85,
'z':447,
'name':'Acacia Grove'},
]
main_crop = (-3000, -3000, 3000, 3000)
renders["overworld"] = {
"world": "overworld",
"title": "Overworld Daytime",
"rendermode": smooth_lighting,
"dimension": "overworld",
"markers": [signs, towns, players],
"manualpois": pois ,
"defaultzoom": zoom,
"crop": main_crop,
}
renders["overworld_night"] = {
"world": "overworld",
"title": "Overworld Night",
"rendermode": smooth_night,
"dimension": "overworld",
"markers": [signs, towns, players],
"manualpois": pois,
"defaultzoom": zoom,
"crop": main_crop,
}
renders["overworld_south"] = {
"world": "overworld",
"title": "Overworld South",
"rendermode": smooth_lighting,
"dimension": "overworld",
"northdirection" : "lower-right",
"markers": [signs, towns, players],
"manualpois": pois,
"defaultzoom": zoom,
"crop": main_crop,
}
renders["the_end"] = {
"world": "end",
"title": "The End",
"rendermode": smooth_lighting,
"dimension": "end",
"defaultzoom": 10,
}
texturepath = "/home/cnaude/Dropbox/Minecraft/ResourcePacks/PERSISTENCE.zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment