Update to version 2.1.0
This commit is contained in:
parent
984380b6fa
commit
10b832bdb2
5 changed files with 53 additions and 78 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
output/
|
33
Dockerfile
33
Dockerfile
|
@ -1,33 +1,14 @@
|
|||
FROM openjdk:13-alpine
|
||||
FROM docker.io/library/openjdk:14-alpine
|
||||
|
||||
MAINTAINER https://github.com/saibotk/BlockMap-Docker
|
||||
ENV VERSION=2.1.0 \
|
||||
SHA1=47de080154f4562dc1601d23b58a12e790ec9fa5
|
||||
|
||||
ARG USER=blockmap
|
||||
ARG GROUP=blockmap
|
||||
ARG PUID=844
|
||||
ARG PGID=844
|
||||
|
||||
ENV OUTPUT=/blockmap/output \
|
||||
INPUT_OVERWORLD=/blockmap/input/overworld \
|
||||
INPUT_NETHER=/blockmap/input/nether/ \
|
||||
INPUT_END=/blockmap/input/end/ \
|
||||
VERSION=1.4.0 \
|
||||
SHA1=6b51f4d3d23094da2820d9461036a618c2933083
|
||||
|
||||
RUN mkdir -p /opt/blockmap /blockmap && \
|
||||
RUN mkdir -p /opt/blockmap /input /output && \
|
||||
apk add --update --no-cache su-exec binutils gettext libintl && \
|
||||
apk add --update --no-cache --virtual .build-deps curl && \
|
||||
curl -sSL https://github.com/Minecraft-Technik-Wiki/BlockMap/releases/download/$VERSION/BlockMap-$VERSION.jar -o /opt/blockmap/BlockMap.jar && \
|
||||
echo "$SHA1 /opt/blockmap/BlockMap.jar" | sha1sum -c && \
|
||||
chmod ugo=rwx /opt/blockmap && \
|
||||
ln -s $INPUT_OVERWORLD /opt/blockmap/overworld && \
|
||||
ln -s $INPUT_NETHER /opt/blockmap/nether && \
|
||||
ln -s $INPUT_END /opt/blockmap/end && \
|
||||
ln -s $OUTPUT /opt/blockmap/output && \
|
||||
apk del .build-deps curl && \
|
||||
addgroup -g $PGID -S $GROUP && \
|
||||
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \
|
||||
chown -R $USER:$GROUP /opt/blockmap /blockmap
|
||||
curl -sSL https://github.com/Minecraft-Technik-Wiki/BlockMap/releases/download/$VERSION/BlockMap-cli-$VERSION.jar -o /opt/blockmap/blockmap.jar && \
|
||||
echo "$SHA1 /opt/blockmap/blockmap.jar" | sha1sum -c && \
|
||||
apk del .build-deps curl
|
||||
|
||||
COPY files/ /
|
||||
|
||||
|
|
13
README.md
13
README.md
|
@ -21,15 +21,12 @@ This image can be used to render a Minecraft map, by just mounting the world fol
|
|||
*They should all point to a directory, where the region files are located (files like **r.0.0.mca**) or if you want all data to be processed, the parent folder (usually where the 'region') folder lives in.*
|
||||
|
||||
```
|
||||
sudo docker run -d \
|
||||
-v /MY-MINECRAFT-PATH/world/:/blockmap/input/overworld/ \
|
||||
-v /MY-MINECRAFT-PATH/world_nether/:/blockmap/input/nether/ \
|
||||
-v /MY-MINECRAFT-PATH/world_the_end/:/blockmap/input/end/ \
|
||||
-v /MY-OUTPUT-PATH/output:/opt/blockmap/output \
|
||||
sudo docker run \
|
||||
-v /MY-MINECRAFT-PATH/world:/input \
|
||||
-v /MY-OUTPUT-PATH/output:/output \
|
||||
--name blockmap \
|
||||
saibotk/blockmap
|
||||
```
|
||||
|
||||
### BlockMap + Nginx setup
|
||||
|
||||
*Coming soon...*
|
||||
### Customization
|
||||
Coming soon
|
36
files/config.json
Normal file
36
files/config.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"output dir": "/output",
|
||||
"hide offline players": false,
|
||||
"worlds": [
|
||||
{
|
||||
"name": "Overworld",
|
||||
"input dir": "/input",
|
||||
"dimension": "OVERWORLD",
|
||||
"force": false,
|
||||
"pins": true
|
||||
},
|
||||
{
|
||||
"name": "Oceans",
|
||||
"input dir": "/input",
|
||||
"dimension": "OVERWORLD",
|
||||
"force": false,
|
||||
"pins": true,
|
||||
"render settings": {
|
||||
"block colors": "OCEAN_GROUND",
|
||||
"shader": "RELIEF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Nether",
|
||||
"input dir": "/input",
|
||||
"dimension": "NETHER",
|
||||
"render settings": {
|
||||
"block colors": "X_RAY",
|
||||
"shader": "FLAT",
|
||||
"maxY": "80"
|
||||
},
|
||||
"force": false,
|
||||
"pins": true
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,50 +1,9 @@
|
|||
#!/bin/sh +x
|
||||
#!/bin/sh
|
||||
# Stop this script on the first failure (e.g. cannot create the output folder)
|
||||
set -e
|
||||
|
||||
# This script renders one or more worlds with different settings. It is an example for how to use BlockMap in scripts. Adapt these
|
||||
# variables to point to the required data for
|
||||
# this to work. Further below are the actual render commands. Feel free to adapt them to your needs.
|
||||
#
|
||||
# The current configuration will render each dimension at least once, the overworld even multiple times (ocean ground view and
|
||||
# cave view). All images are written to a different
|
||||
# subfolder for each setting.
|
||||
echo "[INFO] Start rendering..."
|
||||
|
||||
WORLD_FOLDER_OVERWORLD=/opt/blockmap/overworld
|
||||
WORLD_FOLDER_NETHER=/opt/blockmap/nether
|
||||
WORLD_FOLDER_END=/opt/blockmap/end
|
||||
OUTPUT_DIR=/opt/blockmap/output
|
||||
BLOCKMAP_FILE=/opt/blockmap/BlockMap.jar
|
||||
|
||||
ls -l /opt/blockmap
|
||||
# A simple and plain overworld view
|
||||
echo "[INFO] Rendering overworld..."
|
||||
mkdir -p $OUTPUT_DIR/overworld
|
||||
java -jar $BLOCKMAP_FILE -v render -l -o=$OUTPUT_DIR/overworld $WORLD_FOLDER_OVERWORLD
|
||||
|
||||
# The ocean grounds of the overworld
|
||||
echo "[INFO] Rendering overworld_ocean..."
|
||||
mkdir -p $OUTPUT_DIR/overworld_ocean
|
||||
java -jar $BLOCKMAP_FILE -v render -l -o=$OUTPUT_DIR/overworld_ocean -c=OCEAN_GROUND $WORLD_FOLDER_OVERWORLD
|
||||
|
||||
# The nether up to height 64
|
||||
echo "[INFO] Rendering overworld_nether..."
|
||||
mkdir -p $OUTPUT_DIR/nether
|
||||
java -jar $BLOCKMAP_FILE -v render -l -o=$OUTPUT_DIR/nether --max-height=64 $WORLD_FOLDER_NETHER
|
||||
|
||||
# A plain view of the end
|
||||
echo "[INFO] Rendering overworld_end..."
|
||||
mkdir -p $OUTPUT_DIR/end
|
||||
java -jar $BLOCKMAP_FILE -v render -l -o=$OUTPUT_DIR/end $WORLD_FOLDER_END
|
||||
|
||||
# Write an index file to the root directory. It is a simple name=path properties file, but in JSON.
|
||||
cat << EOF > $OUTPUT_DIR/index.json
|
||||
{
|
||||
"Overworld": "./overworld/rendered.json.gz",
|
||||
"Overworld (Ocean)": "./overworld_ocean/rendered.json.gz",
|
||||
"Nether": "./nether/rendered.json.gz",
|
||||
"End": "./end/rendered.json.gz"
|
||||
}
|
||||
EOF
|
||||
java -jar /opt/blockmap/blockmap.jar render-many /config.json
|
||||
|
||||
echo "[INFO] Rendering finished!"
|
||||
|
|
Loading…
Add table
Reference in a new issue