在SakuraVPS(Ubuntu)上运行Minecraft服务器MOD The Twilight Forest

The Twilight Forest 是什么

这是Minecraft的MOD,在这篇文章中,我们描述了如何启动一个安装了The Twilight Forest MOD的服务器。我们没有描述客户端的安装方法。

    • 参考

https://w.atwiki.jp/minecraft/pages/448.html
https://www.curseforge.com/minecraft/mc-mods/the-twilight-forest

各种方案和版本

截至到撰写本文的時候(2019/11/11),Minecraft官方的最新版本是1.14.4。
Minecraft Forge使用的版本是1.12.2,这是因为The Twilight Forest推荐使用1.12。

    • SakuraVPS 1G プラン

https://vps.sakura.ad.jp/

Minecraft Forge (1.12.2 – 14.23.5.2847)

Minecraft Forge は Minecraftのラッパーサーバです
https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html

Mods

the-twilight-forest

https://www.curseforge.com/minecraft/mc-mods/the-twilight-forest/files

patchouli

https://www.curseforge.com/minecraft/mc-mods/patchouli/files

启动步骤

樱花虚拟专用服务器 huā

我认为最低需要一个1G计划。
SakuraVPS已经准备了一个名为Ubuntu_ScriptOfMinecraftJavaServer的工具,但如果目的是启动The Twilight Forest,即使不使用该工具也可以运行。
但是,使用该工具可以少费一些功夫,因为它会为你进行Java、screen、iptable等设置。

下载Minecraft Forge

AdFoc_us.png

可以下载 forge-1.12.2-14.23.5.2847-installer.jar。

启动Minecraft Forge

$ ssh ubuntu@<sakuravpsのip>
$ sudo mkdir /ops/twilight
$ sudo chown ubuntu:root /ops/twilight
$ cd forge-*-installer.jarのダウンロード先
$ scp forge-*-installer.jar ubuntu@<sakuravpsのip>:/opt/twilight
$ ssh ubuntu@<sakuravpsのip>
$ cd /ops/twilight

# forge-*.*-*.*.*.*-installer.jar を配置
$ java -jar forge-*.*-*.*.*.*-installer.jar nogui --installServer
$ java -Xmx1024M -Xms1024M -jar forge-*.*-*.*.*.*-universal.jar

# ここで eula への同意が必要になります (viで編集するかsedで置換)
$ vi eula.txt
$ sed -i s/false/true/I /opt/minecraft/eula.txt

# もう一度起動します
$ java -Xmx1024M -Xms1024M -jar forge-*.*-*.*.*.*-universal.jar
# 起動後, Ctrl+C などで終了する
# mods/ ディレクトリが作成されている事を確認

安装Mods

    • Mods

the-twilight-forest

https://www.curseforge.com/minecraft/mc-mods/the-twilight-forest/files

patchouli

https://www.curseforge.com/minecraft/mc-mods/patchouli/files

我下載了兩個.jar檔案,我可以用這兩個檔案來啟動/連接。如果還需要其他東西,請隨時添加。

$ cd *.jarのダウンロード先
$ scp twilightforest-1.12.2-3.10.1013-universal.jar ubuntu@<sakuravpsのip>:/opt/twilight/mods
$ scp Patchouli-1.0-20.jar ubuntu@<sakuravpsのip>:/opt/twilight/mods

如果 VPS 重新启动,则自动启动 The Twilight Forest 的设置。

使用Ubuntu_ScriptOfMinecraftJavaServer时,请停止官方的Minecraft systemctl。

$ sudo su -
root@~# systemctl stop minecraft
root@~# systemctl disable minecraft

如果想要确认状态,请查看列表。

$ systemctl list-unit-files --type=service | grep minecraft
minecraft.service                          disabled

在vi等编辑器中创建启动forge的脚本。

#!/bin/bash
cd /opt/twilight && java -Xmx1024M -Xms1024M -jar forge-1.12.2-14.23.5.2847-universal.jar
[Unit]
Description=Server daemon for Minecraft twilight

[Service]
Type=forking
User=ubuntu
KillMode=none
Restart=on-failure
ExecStart=/usr/bin/screen -dmS twilight /bin/bash -c "/opt/twilight/start_server.sh"
ExecStop=/usr/bin/screen -S twilight -X stuff "stop\r"

[Install]
WantedBy=multi-user.target
$ sudo su -
root@~# systemctl start twilight
root@~# systemctl enable twilight

如果一切顺利,”暮色森林”已经启动了。

确认是否应用了“暮光森林”。

    • screenにattach

 

    • /gamemode creative <プレイヤー名>

 

    Minecraftクライアント側で Twilightへの入り口を作成する
广告
将在 10 秒后关闭
bannerAds