mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Ensure datapacks cleanup doesn't remove vanillatweaks (#2262)
This commit is contained in:
1
notes/.gitignore
vendored
Normal file
1
notes/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/*.bkp
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 69 KiB |
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
|
: "${VANILLATWEAKS_FILE:=}"
|
||||||
|
: "${VANILLATWEAKS_SHARECODE:=}"
|
||||||
: "${REMOVE_OLD_DATAPACKS:=false}"
|
: "${REMOVE_OLD_DATAPACKS:=false}"
|
||||||
: "${DATAPACKS_FILE:=}"
|
: "${DATAPACKS_FILE:=}"
|
||||||
: "${REMOVE_OLD_DATAPACKS_DEPTH:=1} "
|
: "${REMOVE_OLD_DATAPACKS_DEPTH:=1} "
|
||||||
@@ -74,4 +76,12 @@ elif [[ "$DATAPACKS_FILE" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${VANILLATWEAKS_FILE} || ${VANILLATWEAKS_SHARECODE} ]]; then
|
||||||
|
mc-image-helper vanillatweaks \
|
||||||
|
--output-directory="/data" \
|
||||||
|
--world-subdir="${LEVEL:-world}" \
|
||||||
|
--share-codes="$VANILLATWEAKS_SHARECODE" \
|
||||||
|
--pack-files="$VANILLATWEAKS_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
exec "${SCRIPTS:-/}start-setupForgeApiMods" "$@"
|
exec "${SCRIPTS:-/}start-setupForgeApiMods" "$@"
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e -o pipefail
|
|
||||||
|
|
||||||
: "${VANILLATWEAKS_FILE:=}"
|
|
||||||
: "${VANILLATWEAKS_SHARECODE:=}"
|
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
|
||||||
. "${SCRIPTS:-/}start-utils"
|
|
||||||
|
|
||||||
if [[ ${VANILLATWEAKS_FILE} || ${VANILLATWEAKS_SHARECODE} ]]; then
|
|
||||||
mc-image-helper vanillatweaks \
|
|
||||||
--output-directory="/data" \
|
|
||||||
--world-subdir="${LEVEL:-world}" \
|
|
||||||
--share-codes="$VANILLATWEAKS_SHARECODE" \
|
|
||||||
--pack-files="$VANILLATWEAKS_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${SCRIPTS:-/}start-setupDatapack" "$@"
|
|
||||||
@@ -48,7 +48,7 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
|
|||||||
count=$(echo "$baseDirs" | wc -l)
|
count=$(echo "$baseDirs" | wc -l)
|
||||||
if [[ $count -gt 1 ]]; then
|
if [[ $count -gt 1 ]]; then
|
||||||
baseDirsNoSpigotSuffix=$(echo "$baseDirs" | sed -re 's:(_nether|_the_end)/?$::' | sort -u)
|
baseDirsNoSpigotSuffix=$(echo "$baseDirs" | sed -re 's:(_nether|_the_end)/?$::' | sort -u)
|
||||||
if [ $(echo "$baseDirsNoSpigotSuffix" | wc -l) -eq 1 ]; then
|
if [ "$(echo "$baseDirsNoSpigotSuffix" | wc -l)" -eq 1 ]; then
|
||||||
baseDir="$baseDirsNoSpigotSuffix"
|
baseDir="$baseDirsNoSpigotSuffix"
|
||||||
baseName=$(basename "$baseDir")
|
baseName=$(basename "$baseDir")
|
||||||
log "Found Spigot naming conventions, taking $baseName as main dimension"
|
log "Found Spigot naming conventions, taking $baseName as main dimension"
|
||||||
@@ -123,4 +123,4 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "${SCRIPTS:-/}start-setupVanillaTweaks" "$@"
|
exec "${SCRIPTS:-/}start-setupDatapack" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user