redhat:other-redhat:minecraft:minecraft-googlemapsexport-redhat

Minecraft Map-Presenter Setup


Installation der benötigten Pakete:

# yum -y update
# yum install numpy python-imaging git gcc python-imaging-devel python-pillow-devel

Installation / Kompilierung des Hauptprogramms:

# mkdir /opt/mapExtractor
# cd /opt/mapExtractor

# git clone https://github.com/overviewer/Minecraft-Overviewer.git
# cd Minecraft-Overviewer

# python setup.py build
# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/1.12.2.jar -P /opt/mapExtractor/
# vim /opt/mapExtractor/export_conf

worlds["world"] = "/opt/minecraft/world/"

renders["world_day"] = {
    "world": "world",
    "title": "Genoni-Server Tag",
    "rendermode": smooth_lighting,
    "dimension": "overworld",
}

renders["world_night"] = {
    "world": "world",
    "title": "Genoni-Server Nacht",
    "rendermode": smooth_night,
    "dimension": "overworld",
}

renders["world_caves"] = {
    "world": "world",
    "title": "Genoni-Server Caves",
    "rendermode": cave,
    "dimension": "overworld",
}

renders["world_nether"] = {
    "world": "world",
    "title": "Genoni-Server Nether",
    "rendermode": nether_smooth_lighting,
    "dimension": "nether",
}

renders["world_nether_caves"] = {
    "world": "world",
    "title": "Genoni-Server Nether-Caves",
    "rendermode": cave,
    "dimension": "nether",
}


outputdir = "/var/www/html/"
texturepath = "/opt/mapExtractor/1.12.2.jar"
    


# vim /opt/mapExtractor/index.html

<meta http-equiv="refresh" content="0; URL=/minecraft/view.html">

# vim /opt/mapExtractor/perform_mapExtraction.sh

#! /bin/bash

newest_client_version=$(curl https://minecraft.net/en-us/download/server | grep https://s3.amazonaws.com/Minecraft.Download/versions/.*/minecraft_server.*.jar | cut -d '/' -f6)

client_version_file=$(ls /opt/mapExtractor | grep *.jar)
in_use_client_version=${client_version_file::-4}

echo $in_use_client_version
echo $newest_client_version

if [ $in_use_client_version == $newest_client_version ]; then
echo "Client is up to date!"
fi

if [ $in_use_client_version != $newest_client_version ]; then
        echo "CLIENT NEEDS UPDATE!"

        rm -f /opt/mapExtractor/*.jar
        wget "https://s3.amazonaws.com/Minecraft.Download/versions/$newest_server_version/$newest_server_version.jar" -P /opt/mapExtractor/

        sed -ri "s/\/opt\/mapExtractor\/(.*)\.jar/\/opt\/mapExtractor\/$newest_client_version.jar/" /opt/mapExtractor/export_conf
fi


cd /opt/mapExtractor/Minecraft-Overviewer/

./overviewer.py -v --config=/opt/mapExtractor/export_conf

if [ ! -f /var/www/html/view.html ]; then
        mv /var/www/html/index.html /var/www/html/view.html
fi
cp /opt/mapExtractor/index.html /var/www/html/
chown -R apache:apache /var/www/html/


# chown -R mcuser:mcuser /opt/mapExtractor
# chmod +x /opt/mapExtractor/perform_mapExtraction.sh
# /opt/mapExtractor/./perform_mapExtraction.sh

ACHTUNG: Am Schluss unter: /opt/mapExtractor/view.html einen Google Maps API-key hinterlegen!


  • redhat/other-redhat/minecraft/minecraft-googlemapsexport-redhat.txt
  • Last modified: 2017/10/05 15:37
  • by michael