diff --git a/README.md b/README.md index ef96aac..ce0c76b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,45 @@ # Shiroha -Shiroha is a fork of [Folia](https://github.com/PaperMC/Folia) — a multithreaded Minecraft server based on Paper. +![License](https://img.shields.io/badge/License-GPL--3.0-blue) +![MC](https://img.shields.io/badge/Minecraft-26.2-green) +![Upstream](https://img.shields.io/badge/Upstream-Folia-orange) -This project aims to provide additional performance optimizations and bug fixes on top of Folia, targeting the latest Minecraft versions (currently 26.2). +Shiroha 是 [Folia](https://github.com/PaperMC/Folia) 的一个分支。Folia 是基于 Paper 的多线程 Minecraft 服务端,Shiroha 在其基础上跟进最新 Minecraft 版本(当前为 26.2,见 `gradle.properties`),做一些修正、性能优化和配置化的功能扩展。 -## Building +本项目为半闭源项目,以本仓库内的内容为准。 + +## 构建 + +需要 Java 25+(构建工具链见 `build.gradle.kts`)。 ```bash ./gradlew applyAllPatches ./gradlew createPaperclipJar ``` -Requires Java 25+. +产物为 paperclip jar,位于 `shiroha-server/build/libs/`。构建任务基于 paperweight-patcher,其余任务可通过 `./gradlew tasks` 查看。 -## License +## 功能 -Licensed under the [GNU General Public License v3.0](LICENSE). +功能大多带有配置开关,配置项定义集中在 `shiroha-server/src/main/java/io/nanachiyo0721/shiroha/config/modules/`,各项的说明直接写在配置文件的注释中,建议以生成出的配置文件和源码注释为准。 + +具体改动以 patch 文件为准: + +- `shiroha-server/minecraft-patches/features/` — 对 Minecraft 源码的改动 +- `shiroha-server/paper-patches/features/` — 对上游 Paper 的改动 +- `shiroha-api/paper-patches/features/` — API 侧改动 + +主要类别: + +- **修正**:Folia 相关的线程与区域化问题、传送与末影珍珠、地狱门 ticket、实体同步等,对应文件名前缀多为 `Fix-*` / `Correct-*`。 +- **优化**:包含部分来自 Leaf、Gale、Purpur、Pufferfish、Lithium 等项目的移植与改写,对应 patch 文件名带有来源前缀;移植的准确性建议对照 patch 内容与原项目确认。 +- **配置系统**:自研的注解式配置框架(`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/config/`),支持热重载与基于 dialog 的图形化配置界面,由 `/shirohaconfig` 命令操作(`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/commands/config/`)。 +- **存档格式**:除原版 `.mca` 外支持 `linear` 与 `b_linear`(带缓冲刷写的 Linear)区域格式(`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/enums/EnumRegionFormat.java`)。 +- **状态栏**:TPS、内存、区域信息状态栏,由 `/bar` 命令与配置控制(`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/functions/bars/`)。 +- **其他**:实体唤醒时长、实体数量限制(Kaiiju)、传送门速率限制、CPU 亲和性等,详见对应 patch 与配置模块。 + +以上列表不保证完整,未列出的改动请自行查阅 patch 目录。 + +## 许可 + +本项目按 [GPL-3.0](LICENSE) 许可。其中从其他项目移植的代码,其归属与许可情况见各 patch 文件内的说明。 diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 0000000..85c315d --- /dev/null +++ b/README_EN.md @@ -0,0 +1,45 @@ +# Shiroha + +![License](https://img.shields.io/badge/License-GPL--3.0-blue) +![MC](https://img.shields.io/badge/Minecraft-26.2-green) +![Upstream](https://img.shields.io/badge/Upstream-Folia-orange) + +Shiroha is a fork of [Folia](https://github.com/PaperMC/Folia), a multithreaded Minecraft server based on Paper. It tracks recent Minecraft versions (currently 26.2, see `gradle.properties`) and applies fixes, performance optimizations, and configurable features on top of upstream. + +This is a partially closed-source project; the contents of this repository are the reference. + +## Building + +Requires Java 25+ (build toolchain configuration is in `build.gradle.kts`). + +```bash +./gradlew applyAllPatches +./gradlew createPaperclipJar +``` + +The output is a paperclip jar in `shiroha-server/build/libs/`. The build is based on paperweight-patcher; other tasks can be listed with `./gradlew tasks`. + +## Features + +Most features are behind configuration switches. Config definitions live in `shiroha-server/src/main/java/io/nanachiyo0721/shiroha/config/modules/`, with per-option documentation written directly into the generated config file comments — treat the generated config and the source annotations as the authoritative description. + +The actual changes are tracked as patch files: + +- `shiroha-server/minecraft-patches/features/` — changes to Minecraft sources +- `shiroha-server/paper-patches/features/` — changes to upstream Paper +- `shiroha-api/paper-patches/features/` — API-side changes + +Main categories: + +- **Fixes**: Folia threading and regionization issues, teleport and ender pearl behavior, nether portal tickets, entity desync, etc. — patch filenames mostly use the `Fix-*` / `Correct-*` prefixes. +- **Optimizations**: includes ports and reworkings taken from projects such as Leaf, Gale, Purpur, Pufferfish, and Lithium; these are marked with their source prefixes in patch filenames. Verify the patch contents against the original projects for attribution and accuracy. +- **Config system**: a custom annotation-based configuration framework (`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/config/`) with hot reload and a dialog-based GUI editor, operated through the `/shirohaconfig` command (`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/commands/config/`). +- **Region formats**: supports `linear` and `b_linear` (buffered-flush Linear) region formats in addition to vanilla `.mca` (`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/enums/EnumRegionFormat.java`). +- **Status bars**: TPS, memory, and region info bars, controlled via the `/bar` command and config (`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/functions/bars/`). +- **Miscellaneous**: entity wake-up duration, entity limits (Kaiiju), portal rate limiting, CPU affinity, and more — see the corresponding patches and config modules. + +This list is not guaranteed to be complete; for anything not listed here, check the patch directories yourself. + +## License + +Licensed under [GPL-3.0](LICENSE). Code ported from other projects retains its own attribution and licensing terms as documented in the respective patch files.