Sign creation no longer scans the block it's mounted on. Instead, placing a "[Stargate]" sign starts a pending link (shown as "Punch the gate" on the sign) and the next block the owner left-clicks within gate.link-timeout-seconds and gate.max-link-distance becomes the scan seed. This lets the sign act like a DHD console standing apart from the gate instead of being physically attached to the frame. - Gate now stores the punched link block's coordinates (link_x/y/z) so restarts re-scan from there instead of deriving a seed from the sign's attachment, which no longer applies. - New GateLinkListener handles the punch and reports scan failures via the existing diagnostic messages; also clears pending state on disconnect. - Exit-location facing is now derived from the punched frame block's position relative to the iris, since a WallSign facing is no longer guaranteed to exist or be relevant.
83 lines
3.8 KiB
Markdown
83 lines
3.8 KiB
Markdown
# Stargate
|
|
|
|
A network-aware Stargate portal plugin for PaperMC, with sign-based dialing and
|
|
cross-server travel over Velocity or BungeeCord.
|
|
|
|
## Modules
|
|
|
|
| Module | What it is |
|
|
|---|---|
|
|
| `stargate-common` | Shared models + JDBC storage (SQLite / MySQL) used only by the Paper plugin |
|
|
| `stargate-paper` | The actual gate plugin — install this on every backend server |
|
|
| `stargate-velocity` | Proxy companion for Velocity — install on the proxy only if using cross-server gates |
|
|
| `stargate-bungee` | Same, for BungeeCord/Waterfall |
|
|
|
|
Build everything with `./gradlew build`. Jars land in each module's `build/libs/`.
|
|
|
|
## Building a gate
|
|
|
|
1. Build a fully-enclosed ring out of any block(s) in `gate.frame-materials` (default:
|
|
obsidian, gold block, gilded blackstone, birch/oak planks). Leave the middle hollow.
|
|
No gaps - the ring must be a sealed loop.
|
|
2. Nothing else to build for chevrons. On creation, the plugin automatically picks
|
|
`gate.chevron-count` (default 6) frame blocks, evenly spaced around the ring, and
|
|
remembers what they looked like at rest. While dialing/open those blocks swap to
|
|
`gate.chevron-lit-material` (default gilded blackstone); closing the gate restores
|
|
them to their original block, so a chevron can rest as plain obsidian and blend
|
|
invisibly into the frame until it lights up.
|
|
3. Place a sign anywhere - it doesn't need to touch the frame, so it can act like a DHD
|
|
console standing apart from the gate - with:
|
|
- Line 1: `[Stargate]`
|
|
- Line 2: network name (blank = default network)
|
|
- Line 3: gate name (blank = auto-generated)
|
|
- Line 4: `hidden` to keep it out of the cycle list, `fixed:GateName` to lock this
|
|
gate to always dial `GateName` (no right-click cycling), or blank
|
|
4. The sign will show "Punch the gate (30s)". Within `gate.link-timeout-seconds`,
|
|
left-click (punch) any block of the frame ring, within `gate.max-link-distance` of
|
|
the sign. The plugin flood-fills out from that block, confirms it's a fully enclosed
|
|
ring, and links the sign to it.
|
|
|
|
If punching a block doesn't work, the plugin tells you exactly why in chat - an
|
|
unrecognized frame material, a gap in the ring, too far from the sign, etc.
|
|
|
|
## Using a gate
|
|
|
|
- **Right-click** the sign: cycles the destination shown on line 3 among the other
|
|
gates on the same network.
|
|
- **Left-click** the sign: dials the shown destination — chevrons light in sequence,
|
|
then the interior fills with `gate.iris-material` (default water). Walk into it to
|
|
teleport. It auto-closes after `dialing.open-seconds`.
|
|
|
|
## Multi-world
|
|
|
|
Gates are addressed by network name, not world — a gate on any loaded world can dial
|
|
any other gate on the same network regardless of world, exactly like same-server
|
|
cross-world travel in the original Stargate mod.
|
|
|
|
## Cross-server (Velocity / Bungee)
|
|
|
|
1. Set `storage.type: mysql` in every backend server's `config.yml` and point them at
|
|
the **same** database — this is how servers see each other's gates.
|
|
2. Give each backend a unique `server-id` in `config.yml` that matches its name in
|
|
the proxy config (`velocity.toml` / `config.yml` servers list).
|
|
3. Set `cross-server.enabled: true` on every backend.
|
|
4. Drop `stargate-velocity` (or `stargate-bungee`) into the proxy's plugin folder.
|
|
|
|
When a player dials a gate hosted on another backend, the Paper plugin asks the
|
|
proxy (over the `stargate:teleport` plugin channel) to connect the player to that
|
|
server; once they land, the proxy forwards a delivery message so the destination
|
|
server's Stargate instance teleports them to the gate's exit point.
|
|
|
|
## Permissions
|
|
|
|
- `stargate.use` (default: true) — dial/cycle gates
|
|
- `stargate.create` (default: op) — build new gates
|
|
- `stargate.destroy` (default: op) — break your own gates
|
|
- `stargate.admin` (default: op) — reload, break/manage any gate
|
|
|
|
## Commands
|
|
|
|
- `/sg list [network]`
|
|
- `/sg destroy` (look at a gate's sign)
|
|
- `/sg reload`
|