**feat(server): add local server initialization and datapack sync**
- Update **ReadMe.md** with: - Spark console command syntax correction - New **Adventure Platform Mod** and **Better Fabric Console** entries - Resolved TODO items: server template setup and datapack sync - Add **bash/init-local-server.sh** to automate server template deployment - Enhance **bash/export-serverpack.sh** with datapack synchronization via `rsync`
This commit is contained in:
@ -48,7 +48,7 @@ OptiFine Alternatives
|
||||
| :-- | :-- | :-- |
|
||||
| **[Iris Shaders](https://www.curseforge.com/minecraft/mc-mods/irisshaders)** | Shader support for Fabric | ✅ **Requires: [[Sodium]](#sodium)**<br>Get shaders from: [Modrinth Shaders](https://modrinth.com/discover/shaders) |
|
||||
| **[Sodium](https://www.curseforge.com/minecraft/mc-mods/sodium)** | Drastically improves client performance | **Required by: [[Iris]](#iris-shaders)** |
|
||||
| **[Spark](https://spark.lucko.me)** | Performance profiler for diagnosing lag and memory issues | `/spark profiler` to start/stop profiling |
|
||||
| **[Spark](https://spark.lucko.me)** | Performance profiler for diagnosing lag and memory issues | Console: `spark profiler start --allow`, `spark profiler stop` |
|
||||
|
||||
---
|
||||
|
||||
@ -57,6 +57,7 @@ OptiFine Alternatives
|
||||
|
||||
| Mod | Purpose | Required For |
|
||||
| :-- | :-- | :-- |
|
||||
| **[Adventure Platform Mod](https://modrinth.com/mod/adventure-platform-mod)** | Kyori Adventure on Fabric | Required by **[[Better Fabric Console]](#better-fabric-console)** |
|
||||
| **[Collective](https://www.curseforge.com/minecraft/mc-mods/collective)** | Library for shared code | Service module for **[[Serilum]](#serilum-mods)** mods |
|
||||
| **[Fabric API](https://www.curseforge.com/minecraft/mc-mods/fabric-api)** | Core hooks for Fabric mods | Needed for **[[Forge Config API Port]](#forge-config-api-port)** & **[[Advanced XRay]](#-cheats)** & **[Tech Reborn](https://www.curseforge.com/minecraft/mc-mods/techreborn)** & **[Tom's Simple Storage Mod (Fabric)](https://www.curseforge.com/minecraft/mc-mods/toms-storage-fabric)**|
|
||||
| **[Forge Config API Port](https://www.curseforge.com/minecraft/mc-mods/forge-config-api-port)** | Port of Forge's config system | Required by **[[Remove Reloading Screen]](#-improvements--enhancements)**.<br>✅ **Requires: [[Fabric API]](#fabric-api)** |
|
||||
@ -93,6 +94,7 @@ OptiFine Alternatives
|
||||
|
||||
| Mod | Description | Dependencies |
|
||||
| :-- | :-- | :-- |
|
||||
| **[Better Fabric Console](https://modrinth.com/mod/better-fabric-console)** 🥕 | **The** server console upgrade: MC 26 vanilla reads stdin via dumb `readLine()` — no history, no line editing, arrow keys print `^[[D` like it's 1995. This mod replaces all of that with a full JLine terminal: ↑/↓ command history, left/right editing, tab completion, syntax highlighting, readable colored logs. If you touch the server console more than once a week, this mod is non-negotiable | **Server-only.** ✅ **Requires: [[Adventure Platform Mod]](#adventure-platform-mod)** & **[[Fabric API]](#fabric-api)** |
|
||||
| **[Dynamic FPS](https://www.curseforge.com/minecraft/mc-mods/dynamic-fps)** | Reduces FPS when the game is not in focus. | |
|
||||
| **[Remove Reloading Screen](https://www.curseforge.com/minecraft/mc-mods/rrls)** | Removes the red reload splash screen when changing settings | ✅ **Requires: [[Forge Config API Port]](#forge-config-api-port)** |
|
||||
|
||||
@ -158,8 +160,8 @@ OptiFine Alternatives
|
||||
|
||||
# TODO
|
||||
|
||||
- Обязвку для создания сервера добавить сюда в сборку под git
|
||||
- При экспорте серверной сборки в локальный папку - синхронизировать датапаки по типу `rsync -a datapacks/ /home/dimti/Seafile/minecraft/installers/m2612/world/datapacks/`
|
||||
- ~~Обязвку для создания сервера добавить сюда в сборку под git~~ → `server-template/` + `bash/init-local-server.sh`
|
||||
- ~~При экспорте серверной сборки в локальный папку - синхронизировать датапаки~~ → сделано в `bash/export-serverpack.sh`
|
||||
- При отправки обновленной сборки на NixOS-сервер - синхронизировать каким-нибудь образом датапаки
|
||||
|
||||
# Datapacks
|
||||
|
||||
@ -32,4 +32,11 @@ rm -rf "${TARGET_DIR}/config"
|
||||
echo "Распаковка архива в ${TARGET_DIR}..."
|
||||
unzip -o ${SOURCE_ZIP} -d "${TARGET_DIR}"
|
||||
|
||||
echo "Синхронизация завершена успешно."
|
||||
# Синхронизируем датапаки в мир локального сервера
|
||||
DATAPACKS_SRC="${REPO_ROOT}/datapacks/"
|
||||
DATAPACKS_DST="${TARGET_DIR}/world/datapacks/"
|
||||
echo "Синхронизация датапаков: ${DATAPACKS_SRC} → ${DATAPACKS_DST}"
|
||||
mkdir -p "${DATAPACKS_DST}"
|
||||
rsync -a "${DATAPACKS_SRC}" "${DATAPACKS_DST}"
|
||||
|
||||
echo "Синхронизация завершена успешно."
|
||||
|
||||
53
bash/init-local-server.sh
Executable file
53
bash/init-local-server.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Развёртывание минимального локального тестового сервера:
|
||||
# eula.txt, server.properties, start.sh + Fabric Server Launcher.
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
REPO_ROOT="${SCRIPT_DIR}/.."
|
||||
TEMPLATE_DIR="${REPO_ROOT}/server-template"
|
||||
TARGET_DIR="/home/dimti/Seafile/minecraft/installers/m2612"
|
||||
LOCK_FILE="${REPO_ROOT}/pakku-lock.json"
|
||||
FABRIC_INSTALLER_VERSION="${FABRIC_INSTALLER_VERSION:-1.1.1}"
|
||||
|
||||
cd "${REPO_ROOT}" || exit 1
|
||||
|
||||
if [[ ! -f "${LOCK_FILE}" ]]; then
|
||||
echo "Ошибка: не найден ${LOCK_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MC_VERSION=$(python3 -c "import json; print(json.load(open('${LOCK_FILE}'))['mc_versions'][0])")
|
||||
LOADER_VERSION=$(python3 -c "import json; print(json.load(open('${LOCK_FILE}'))['loaders']['fabric'])")
|
||||
FABRIC_JAR="fabric-server-mc.${MC_VERSION}-loader.${LOADER_VERSION}-launcher.${FABRIC_INSTALLER_VERSION}.jar"
|
||||
FABRIC_URL="https://meta.fabricmc.net/v2/versions/loader/${MC_VERSION}/${LOADER_VERSION}/${FABRIC_INSTALLER_VERSION}/server/jar"
|
||||
|
||||
echo "MC=${MC_VERSION} loader=${LOADER_VERSION} installer=${FABRIC_INSTALLER_VERSION}"
|
||||
echo "Целевая папка: ${TARGET_DIR}"
|
||||
|
||||
mkdir -p "${TARGET_DIR}"
|
||||
|
||||
cp -f "${TEMPLATE_DIR}/eula.txt" "${TARGET_DIR}/eula.txt"
|
||||
|
||||
if [[ ! -f "${TARGET_DIR}/server.properties" ]]; then
|
||||
cp "${TEMPLATE_DIR}/server.properties" "${TARGET_DIR}/server.properties"
|
||||
echo "Создан server.properties из шаблона"
|
||||
else
|
||||
echo "server.properties уже есть — не перезаписываю"
|
||||
fi
|
||||
|
||||
sed "s/__FABRIC_SERVER_JAR__/${FABRIC_JAR}/" "${TEMPLATE_DIR}/start.sh" > "${TARGET_DIR}/start.sh"
|
||||
chmod +x "${TARGET_DIR}/start.sh"
|
||||
echo "Обновлён start.sh → ${FABRIC_JAR}"
|
||||
|
||||
if [[ -f "${TARGET_DIR}/${FABRIC_JAR}" ]]; then
|
||||
echo "Fabric launcher уже скачан: ${FABRIC_JAR}"
|
||||
else
|
||||
echo "Скачиваю Fabric Server Launcher..."
|
||||
curl -fL --progress-bar -o "${TARGET_DIR}/${FABRIC_JAR}" "${FABRIC_URL}"
|
||||
echo "Скачан: ${TARGET_DIR}/${FABRIC_JAR}"
|
||||
fi
|
||||
|
||||
echo "Готово. Запуск: ${TARGET_DIR}/start.sh"
|
||||
11
bash/start-local-server.sh
Executable file
11
bash/start-local-server.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Запуск локального тестового сервера.
|
||||
# MC 26.1.2 требует Java 25. Консоль с историей — better-fabric-console (vanilla readLine стрелки не понимает).
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
SERVER_DIR="/home/dimti/Seafile/minecraft/installers/m2612"
|
||||
|
||||
cd "${SERVER_DIR}"
|
||||
exec bash start.sh
|
||||
BIN
mods/adventure-platform-fabric-6.9.0.jar
Normal file
BIN
mods/adventure-platform-fabric-6.9.0.jar
Normal file
Binary file not shown.
BIN
mods/better-fabric-console-mc26.1.2-2.0.0.jar
Normal file
BIN
mods/better-fabric-console-mc26.1.2-2.0.0.jar
Normal file
Binary file not shown.
@ -462,6 +462,51 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"pakku_id": "e1fNU92neL5v8WNp",
|
||||
"pakku_links": [
|
||||
"nWaCtvtb2WJpkfg2",
|
||||
"oJMh4DIB3LCTd6nF"
|
||||
],
|
||||
"type": "MOD",
|
||||
"side": "SERVER",
|
||||
"slug": {
|
||||
"modrinth": "better-fabric-console"
|
||||
},
|
||||
"name": {
|
||||
"modrinth": "Better Fabric Console"
|
||||
},
|
||||
"id": {
|
||||
"modrinth": "Y8o1j1Sf"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"type": "modrinth",
|
||||
"file_name": "better-fabric-console-mc26.1.2-2.0.0.jar",
|
||||
"mc_versions": [
|
||||
"26.1.2",
|
||||
"26.2"
|
||||
],
|
||||
"loaders": [
|
||||
"fabric"
|
||||
],
|
||||
"release_type": "release",
|
||||
"url": "https://cdn.modrinth.com/data/Y8o1j1Sf/versions/hOTbk3bT/better-fabric-console-mc26.1.2-2.0.0.jar",
|
||||
"id": "hOTbk3bT",
|
||||
"parent_id": "Y8o1j1Sf",
|
||||
"hashes": {
|
||||
"sha512": "32b581f4a92b13a89f149c50025d21a87c4e87159daf5d1c4a099b9149c3ea630790b4e248a05f9139885a8df90b610f05cc099d9a46e2f037565c5d5c617506",
|
||||
"sha1": "1714a377c3ca6d88157d5569dbcd91008dc33155"
|
||||
},
|
||||
"required_dependencies": [
|
||||
"O5VsIpQY",
|
||||
"P7dR8mSH"
|
||||
],
|
||||
"size": 1564220,
|
||||
"date_published": "2026-07-08T22:57:38.008788Z"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"pakku_id": "Y55eYmQZHYB1sHSu",
|
||||
"type": "MOD",
|
||||
"side": "CLIENT",
|
||||
@ -3496,6 +3541,50 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"pakku_id": "nWaCtvtb2WJpkfg2",
|
||||
"pakku_links": [
|
||||
"oJMh4DIB3LCTd6nF"
|
||||
],
|
||||
"type": "MOD",
|
||||
"side": "BOTH",
|
||||
"slug": {
|
||||
"modrinth": "adventure-platform-mod"
|
||||
},
|
||||
"name": {
|
||||
"modrinth": "adventure-platform-mod"
|
||||
},
|
||||
"id": {
|
||||
"modrinth": "O5VsIpQY"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"type": "modrinth",
|
||||
"file_name": "adventure-platform-fabric-6.9.0.jar",
|
||||
"mc_versions": [
|
||||
"26.1",
|
||||
"26.1.1",
|
||||
"26.1.2"
|
||||
],
|
||||
"loaders": [
|
||||
"fabric"
|
||||
],
|
||||
"release_type": "release",
|
||||
"url": "https://cdn.modrinth.com/data/O5VsIpQY/versions/Rvd03EvD/adventure-platform-fabric-6.9.0.jar",
|
||||
"id": "Rvd03EvD",
|
||||
"parent_id": "O5VsIpQY",
|
||||
"hashes": {
|
||||
"sha512": "e74182238faea8be1f03c523ccd73e4b2e117c59bf9fb9b2382eb06995658b65cfc490acdcbf1eef8078829a99c048e98227c472754ca0be747fe3e06eb7b574",
|
||||
"sha1": "259d952d0800cabbc8b651fb4a21ce5b32ddc0bf"
|
||||
},
|
||||
"required_dependencies": [
|
||||
"P7dR8mSH"
|
||||
],
|
||||
"size": 1006092,
|
||||
"date_published": "2026-04-15T01:56:24.864176Z"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"pakku_id": "hh5QeN4Nk3nGGXqK",
|
||||
"type": "MOD",
|
||||
"slug": {
|
||||
|
||||
1
server-template/eula.txt
Normal file
1
server-template/eula.txt
Normal file
@ -0,0 +1 @@
|
||||
eula=true
|
||||
67
server-template/server.properties
Normal file
67
server-template/server.properties
Normal file
@ -0,0 +1,67 @@
|
||||
#Minecraft server properties (template)
|
||||
accepts-transfers=false
|
||||
allow-flight=false
|
||||
broadcast-console-to-ops=true
|
||||
broadcast-rcon-to-ops=true
|
||||
bug-report-link=
|
||||
difficulty=easy
|
||||
enable-code-of-conduct=false
|
||||
enable-jmx-monitoring=false
|
||||
enable-query=false
|
||||
enable-rcon=false
|
||||
enable-status=true
|
||||
enforce-secure-profile=true
|
||||
enforce-whitelist=false
|
||||
entity-broadcast-range-percentage=100
|
||||
force-gamemode=false
|
||||
function-permission-level=2
|
||||
gamemode=survival
|
||||
generate-structures=true
|
||||
generator-settings={}
|
||||
hardcore=false
|
||||
hide-online-players=false
|
||||
initial-disabled-packs=
|
||||
initial-enabled-packs=vanilla
|
||||
level-name=world
|
||||
level-seed=
|
||||
level-type=minecraft\:normal
|
||||
log-ips=true
|
||||
management-server-allowed-origins=
|
||||
management-server-enabled=false
|
||||
management-server-host=localhost
|
||||
management-server-port=0
|
||||
management-server-tls-enabled=true
|
||||
management-server-tls-keystore=
|
||||
management-server-tls-keystore-password=
|
||||
max-chained-neighbor-updates=1000000
|
||||
max-players=20
|
||||
max-tick-time=60000
|
||||
max-world-size=29999984
|
||||
motd=A Minecraft Server
|
||||
network-compression-threshold=256
|
||||
online-mode=false
|
||||
op-permission-level=4
|
||||
pause-when-empty-seconds=60
|
||||
player-idle-timeout=0
|
||||
prevent-proxy-connections=false
|
||||
query.port=25565
|
||||
rate-limit=0
|
||||
rcon.password=
|
||||
rcon.port=25575
|
||||
region-file-compression=deflate
|
||||
require-resource-pack=false
|
||||
resource-pack=
|
||||
resource-pack-id=
|
||||
resource-pack-prompt=
|
||||
resource-pack-sha1=
|
||||
server-ip=
|
||||
server-port=25565
|
||||
simulation-distance=10
|
||||
spawn-protection=16
|
||||
status-heartbeat-interval=0
|
||||
sync-chunk-writes=true
|
||||
text-filtering-config=
|
||||
text-filtering-version=0
|
||||
use-native-transport=true
|
||||
view-distance=10
|
||||
white-list=false
|
||||
6
server-template/start.sh
Executable file
6
server-template/start.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# MC 26.1.2 требует Java 25 (class file 69). Консоль с историей — better-fabric-console.
|
||||
# epsilon - 25
|
||||
# delta - 21
|
||||
JAVA=/home/dimti/.local/share/FreesmLauncher/java/java-runtime-epsilon/bin/java
|
||||
exec "$JAVA" -Xmx2G -jar __FABRIC_SERVER_JAR__ nogui
|
||||
Reference in New Issue
Block a user