-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
101 lines (84 loc) · 2.68 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import os
import sys
sys.path.append(os.environ.get("WORKSPACE"))
from collections import OrderedDict
from .observer import JSObserver, MultiplexingObserver, LoggingObserver
from common import (
overworld_marker_definitions,
nether_marker_definitions,
end_marker_definitions,
)
worlds = OrderedDict()
renders = OrderedDict()
world_name_map = {
"s2": "Bob",
}
server_id = os.environ.get("SERVER")
world_name = world_name_map[server_id]
worlds[world_name] = (
os.environ.get("MINECRAFT_WORLD_STAGING") + f"/{server_id}/{world_name}"
)
worlds[f"{world_name}_nether"] = (
os.environ.get("MINECRAFT_WORLD_STAGING") + f"/{server_id}/{world_name}_nether"
)
worlds[f"{world_name}_the_end"] = (
os.environ.get("MINECRAFT_WORLD_STAGING") + f"/{server_id}/{world_name}_the_end"
)
outputdir = os.environ.get("OVERVIEWER_OUTPUT_DIRECTORY")
customwebassets = os.environ.get("WORKSPACE") + "/assets"
feature_flags['render_legacy_chunks'] = True
if os.environ.get("IN_MAPGEN", 0):
observer_list = [LoggingObserver(), JSObserver(outputdir=outputdir, minrefresh=10)]
else:
observer_list = [LoggingObserver()]
observer = MultiplexingObserver(*observer_list)
renders["myrender"] = {
"world": world_name,
"title": f"LizardNet Minecraft Server {server_id} Overworld",
"markers": overworld_marker_definitions(),
"rendermode": "smooth_lighting",
"dimension": "overworld",
"imgformat": "jpeg",
"imgquality": 90
# "optimizeimg": [optipng(olevel=3)]
}
renders["myrender_night"] = {
"world": world_name,
"title": f"LizardNet Minecraft Server {server_id} Overworld (nighttime)",
"markers": overworld_marker_definitions(),
"rendermode": "smooth_night",
"dimension": "overworld",
"imgformat": "jpeg",
"imgquality": 90
# "optimizeimg": [optipng(olevel=3)]
}
renders["nether"] = {
"world": f"{world_name}_nether",
"title": f"LizardNet Minecraft Server {server_id} NETHER",
"markers": nether_marker_definitions(),
"rendermode": "nether",
"dimension": "nether",
"imgformat": "jpeg",
"imgquality": 90
# "optimizeimg": [optipng(olevel=3)]
}
renders["the_end"] = {
"world": f"{world_name}_the_end",
"title": f"LizardNet Minecraft Server {server_id} THE END",
"markers": end_marker_definitions(),
"rendermode": "normal",
"dimension": "end",
"imgformat": "jpeg",
"imgquality": 90
# "optimizeimg": [optipng(olevel=3)]
}
renders["biomeoverlay"] = {
"world": world_name,
"rendermode": [ClearBase(), BiomeOverlay()],
"title": "Biome Coloring Overlay",
"overlay": ["myrender"],
"dimension": "overworld",
"imgformat": "jpeg",
"imgquality": 90
# "optimizeimg": [optipng(olevel=3)]
}