mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
[mc] For FTB add legacy java fixer option
This commit is contained in:
parent
931c27a5ec
commit
f5f20f3563
5 changed files with 56 additions and 12 deletions
5
.editorconfig
Normal file
5
.editorconfig
Normal file
|
@ -0,0 +1,5 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
2
minecraft-server/.editorconfig
Normal file
2
minecraft-server/.editorconfig
Normal file
|
@ -0,0 +1,2 @@
|
|||
[start-*]
|
||||
indent_size = 2
|
|
@ -398,6 +398,16 @@ example:
|
|||
Note: The FTB server start script will also override other options,
|
||||
like `MOTD`.
|
||||
|
||||
### Fixing "unable to launch forgemodloader"
|
||||
|
||||
If your server's modpack fails to load with an error [like this](https://support.feed-the-beast.com/t/cant-start-crashlanding-server-unable-to-launch-forgemodloader/6028/2):
|
||||
|
||||
unable to launch forgemodloader
|
||||
|
||||
then you apply a workaround by adding this to the run invocation:
|
||||
|
||||
-e FTB_LEGACYJAVAFIXER=true
|
||||
|
||||
## Running a SpongeVanilla server
|
||||
|
||||
Enable SpongeVanilla server mode by adding a `-e TYPE=SPONGEVANILLA` to your command-line.
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
|
||||
legacyJavaFixerUrl=http://ftb.cursecdn.com/FTB2/maven/net/minecraftforge/lex/legacyjavafixer/1.0/legacyjavafixer-1.0.jar
|
||||
legacyJavaFixerPath=/data/FeedTheBeast/mods/legacyjavafixer.jar
|
||||
export TYPE=FEED-THE-BEAST
|
||||
|
||||
function isURL {
|
||||
local value=$1
|
||||
|
||||
if [[ ${value:0:8} == "https://" || ${value:0:7} = "http://" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Looking for Feed-The-Beast server modpack."
|
||||
if [[ -z $FTB_SERVER_MOD ]]; then
|
||||
echo "Environment variable FTB_SERVER_MOD not set."
|
||||
|
@ -23,7 +17,7 @@ srv_modpack=${FTB_SERVER_MOD}
|
|||
if isURL ${srv_modpack}; then
|
||||
case $srv_modpack in
|
||||
https://www.feed-the-beast.com/*/download)
|
||||
break;;
|
||||
;;
|
||||
https://www.feed-the-beast.com/*)
|
||||
srv_modpack=${srv_modpack}/download;;
|
||||
esac
|
||||
|
@ -57,12 +51,17 @@ fi
|
|||
if [ ! -d ${FTB_DIR} ]; then
|
||||
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||
mkdir -p ${FTB_DIR}
|
||||
unzip -o ${srv_modpack} -d ${FTB_DIR}
|
||||
unzip -o ${srv_modpack} -d ${FTB_DIR} | awk '{printf "."} END {print ""}'
|
||||
cp -f /data/eula.txt ${FTB_DIR}/eula.txt
|
||||
fi
|
||||
export FTB_SERVER_START=${FTB_DIR}/ServerStart.sh
|
||||
chmod a+x ${FTB_SERVER_START}
|
||||
sed -i "s/-jar/-Dfml.queryResult=confirm -jar/" ${FTB_SERVER_START}
|
||||
|
||||
if isTrue ${FTB_LEGACYJAVAFIXER} && [ ! -e ${legacyJavaFixerPath} ]; then
|
||||
echo "Installing legacy java fixer to ${legacyJavaFixerPath}"
|
||||
curl -sSL -o ${legacyJavaFixerPath} ${legacyJavaFixerUrl}
|
||||
fi
|
||||
|
||||
# Continue to Final Setup
|
||||
exec /start-finalSetup01World $@
|
||||
|
|
28
minecraft-server/start-utils
Normal file
28
minecraft-server/start-utils
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
function isURL {
|
||||
local value=$1
|
||||
|
||||
if [[ ${value:0:8} == "https://" || ${value:0:7} = "http://" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function isTrue {
|
||||
local value=${1,,}
|
||||
|
||||
result=
|
||||
|
||||
case ${value} in
|
||||
true|on)
|
||||
result=0
|
||||
;;
|
||||
*)
|
||||
result=1
|
||||
;;
|
||||
esac
|
||||
|
||||
return ${result}
|
||||
}
|
Loading…
Reference in a new issue