Files
pt-minecraft-modpack/README.md

90 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# PT's Basic Modpack
一些最基础的功能的模组包,包括录制、光影、基本优化等。主打原版味道。
## 开发
分为服务端和客户端两部分。服务端会在不同时间,安装不同的娱乐性质的模组。客户端则会努力保持不变。
使用 [packwiz](https://packwiz.infra.link) 进行模组包管理。
首先你要安装 packwiz。建议的是用 Golang 技术栈来直接安装:
```bash
go install github.com/packwiz/packwiz@latest
```
然后,进入对应的目录开始工作。例如要更改客户端相关:
```bash
cd client
```
### 添加模组
```bash
packwiz add https://modrinth.com/mod/create
```
### 构建 .mrpack 文件
```bash
packwiz modrinth export
```
## 服务端部署
参见 [该文档](https://packwiz.infra.link/tutorials/installing/packwiz-installer/)。
可以直接使用 Docker 来测试运行:
```bash
docker run --pull=always \
-e TYPE=FABRIC \
-e "PACKWIZ_URL=https://gitea.service.jazzwhom.top/Passthem/pt-minecraft-modpack/raw/branch/main/server-01-random-block/pack.toml" \
-e "EULA=TRUE" \
-e "VERSION=1.21.10" \
-p 25565:25565 \
itzg/minecraft-server
```
或者,需要从 [https://github.com/packwiz/packwiz-installer/releases](这里) 下载最新最热的 Installer以安装需要的文件。
### 部署到 Simpfun
在 Simpfun 申请一个服务器实例,选择多 JDK 版本的镜像。`B+.I.2XL.L` 规格的服务器是个不错的选择。因为我每次只开一天,所以天天签到拿到的积分会很够。
`管理 - 实例端口` 处花 100 积分申请一个新的端口用于 Simple Voice Chat 模组。
下载 [panel-start.sh](https://gitea.service.jazzwhom.top/Passthem/pt-minecraft-modpack/raw/branch/main/panel-start.sh) 到本地,编辑 `PT_SERVER="${PT_SERVER:-server-02-skygrid}"` 一行为你需要的服务器配置文件文件夹名。
有可能会出现 packwiz 的各种包下不下来的情况(因为国内网络问题)所以,你可能需要手动下载 [packwiz-installer.jar](https://github.com/packwiz/packwiz-installer/releases/latest/download/packwiz-installer.jar) 和 [packwiz-installer-bootstrap.jar](https://github.com/packwiz/packwiz-installer-bootstrap/releases/latest/download/packwiz-installer-bootstrap.jar),并放置到 `/pt-minecraft-modpack/.pt-panel-runtime/downloads` 文件夹下。
#### 配置一些文件
`server.properties` 编辑 `server-port` 为主端口。编辑:
```env
online-mode=true
spawn-protection=0
```
`/pt-minecraft-modpack/config/voicechat/voicechat-server.properties` 编辑 `port` 为附端口。编辑:
```env
# The distance to which the voice can be heard
max_voice_distance=64.0
# The distance to which the voice can be heard when whispering
whisper_distance=32.0
```
#### 运营时注意
`管理 - 当前实例信息` 右边的小问号可以使用积分兑换上行流量。10 积分兑换 1G。
这里的上行流量值,要时常刷新以了解流量消耗。
如果积分不足以兑换流量,可以在控制台的 `积分` 值右边的加号充值。12CNY 兑换 600 积分。
在 [这里](https://simp.host/status/simpfun) 可以查看 Simpfun 站点的 Uptime。