Skip to content

Commit ed49d23

Browse files
authored
Fix overviewer mapping when world mirroring is enabled
1 parent a4b7379 commit ed49d23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

msctl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,9 +1630,9 @@ overviewer() {
16301630
updateClientSoftware "$1"
16311631
# Create a default Overviewer settings file if it is missing.
16321632
if [ ! -e $SETTINGS_FILE ]; then
1633-
# Use the backup location so we minimize the time the server isn't saving
1634-
# data.
1635-
printf "worlds['$1'] = '$BACKUP_LOCATION/$1/$1'\n\n" >$SETTINGS_FILE
1633+
# Use the backup location so we minimize the time the server isn't saving data.
1634+
printf "import os\n\n" >$SETTINGS_FILE
1635+
printf "worlds['$1'] = '$BACKUP_LOCATION/$1/$1-original' if os.path.exists('$BACKUP_LOCATION/$1/$1-original') else '$BACKUP_LOCATION/$1/$1'\n\n" >>$SETTINGS_FILE
16361636
printf "renders['overworld-render'] = {\n" >>$SETTINGS_FILE
16371637
printf " 'world': '$1',\n" >>$SETTINGS_FILE
16381638
printf " 'title': 'Overworld',\n" >>$SETTINGS_FILE

0 commit comments

Comments
 (0)