Files

46 lines
3.0 KiB
Markdown
Raw Permalink Normal View History

2026-08-12 23:41:07 +08:00
# 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/`).
2026-08-13 11:05:32 +08:00
- **Region formats**: supports `b_linear` (buffered-flush Linear) region format in addition to vanilla `.mca` (`shiroha-server/src/main/java/io/nanachiyo0721/shiroha/enums/EnumRegionFormat.java`).
2026-08-12 23:41:07 +08:00
- **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.