Initial Lobby Systems v1.2.0
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
# Lobby Systems - Fabric 26.2
|
||||
|
||||
Server-side lobby router untuk Minecraft Java 26.2 / Fabric.
|
||||
|
||||
## Identity
|
||||
- Mod ID: `dartokloning`
|
||||
- Java package: `id.dartokloning.lobbysystems`
|
||||
- Maven group: `id.dartokloning`
|
||||
- Mod name: `Lobby Systems`
|
||||
|
||||
## Requirements
|
||||
- JDK / Java 25 atau lebih baru
|
||||
- Minecraft 26.2
|
||||
- Fabric Loader 0.19.3+
|
||||
- Fabric API 0.156.0+26.2
|
||||
- Internet pada build pertama untuk mengunduh Gradle dan dependency Fabric/Minecraft
|
||||
- Optional: World Manager 1.4.4+26.2 hanya untuk membuat/mengelola world; Lobby Systems tidak memiliki hard dependency ke World Manager
|
||||
|
||||
## Compile di Windows
|
||||
Cara termudah: double-click `compile.bat`.
|
||||
|
||||
Script tersebut memanggil `compile.ps1`, mengecek Java 25+, mengunduh Gradle 9.5.1 secara lokal ke `.gradle-local` bila diperlukan, lalu menjalankan:
|
||||
|
||||
```text
|
||||
clean build
|
||||
```
|
||||
|
||||
Alternatif PowerShell:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File .\compile.ps1
|
||||
```
|
||||
|
||||
JAR hasil build berada di:
|
||||
|
||||
```text
|
||||
build\libs\
|
||||
```
|
||||
|
||||
Folder `.gradle-local` hanya cache Gradle lokal project dan boleh dihapus kapan saja.
|
||||
|
||||
## Compile manual
|
||||
Jika Gradle sudah terpasang:
|
||||
|
||||
```bash
|
||||
gradle clean build
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Jalankan server sekali. Edit:
|
||||
|
||||
`config/lobby-systems.json`
|
||||
|
||||
Contoh:
|
||||
|
||||
```json
|
||||
{
|
||||
"lobbyDimension": "minecraft:overworld",
|
||||
"lobbyX": 0.5,
|
||||
"lobbyY": 100.0,
|
||||
"lobbyZ": 0.5,
|
||||
"lobbyYaw": 0.0,
|
||||
"lobbyPitch": 0.0,
|
||||
"minimumPlaySeconds": 300,
|
||||
"inLobbyMessage": "§eKamu sudah berada di lobby.",
|
||||
"returnedMessage": "§aKamu telah kembali ke lobby.",
|
||||
"waitMessage": "§cKamu belum bisa kembali ke lobby. Tunggu §e{time}§c lagi."
|
||||
}
|
||||
```
|
||||
|
||||
Set `lobbyDimension` ke identifier dimensi/world yang dibuat oleh World Manager.
|
||||
|
||||
## Behavior
|
||||
1. Setiap login diarahkan ke dimensi dan koordinat lobby yang dikonfigurasi.
|
||||
2. Saat player keluar lobby dan masuk dimensi lain, timer sesi game baru dimulai.
|
||||
3. `/lobby` saat sudah berada di lobby hanya memberi informasi bahwa player sedang di lobby.
|
||||
4. `/lobby` di luar lobby diblokir sampai `minimumPlaySeconds` berlalu dan menampilkan countdown.
|
||||
5. Setelah timer selesai, `/lobby` mengembalikan player ke lobby.
|
||||
6. Pindah dari satu dimensi non-lobby ke dimensi game lain memulai timer baru untuk dimensi tersebut.
|
||||
7. Reconnect selalu mengembalikan player ke lobby dan membersihkan timer sesi sebelumnya.
|
||||
|
||||
## World Manager integration
|
||||
Lobby Systems tidak menggunakan internal API World Manager. World Manager cukup membuat/load custom world, kemudian ID dimensinya dimasukkan ke `lobby-systems.json`. Dengan desain ini, portal mod/command lain juga tetap bisa digunakan.
|
||||
|
||||
## Admin command (v1.1.3)
|
||||
|
||||
Requires Minecraft admin/OP command permission.
|
||||
|
||||
- `/ls reload` — reloads `config/lobby-systems.json` live without restarting the server.
|
||||
- `/ls tp <dimension>` — teleports the executing player to a loaded dimension. The `<dimension>` argument autocompletes from the server's currently loaded dimension keys.
|
||||
|
||||
### Last-position behavior
|
||||
|
||||
Lobby Systems stores each player's last coordinates and rotation per dimension in:
|
||||
|
||||
`config/lobby-systems-positions.json`
|
||||
|
||||
When `/ls tp <dimension>` is used, the player returns to their last recorded position in that dimension. If the player has never visited that dimension before, the command falls back to the dimension's configured respawn/spawn position.
|
||||
|
||||
Positions are captured for non-lobby dimensions when players change dimensions, use `/ls tp`, use `/lobby`, disconnect, and are periodically flushed to disk. The configured lobby dimension is deliberately excluded: every teleport/login to the lobby always uses `lobbyX/Y/Z/Yaw/Pitch` from `lobby-systems.json`. Existing saved lobby-position entries are removed automatically on startup/reload.
|
||||
|
||||
## v1.1.3 stability changes
|
||||
- Cross-dimension teleports now use Minecraft's `TeleportTransition` path instead of calling `teleportTo(...)` directly.
|
||||
- Destination chunk is loaded before the transition is sent.
|
||||
- Login-to-lobby is delayed 20 server ticks so the client has time to finish entering play state.
|
||||
- A 40-tick per-player teleport lock prevents overlapping dimension transitions.
|
||||
- Lobby position persistence is enforced inside `PositionManager`, not only at call sites. The configured lobby dimension is purged on startup/reload and filtered again before every save, so it cannot be written to `lobby-systems-positions.json`.
|
||||
Reference in New Issue
Block a user