Fix one-way travel, rework iris to SG-1 mechanics, glowstone chevrons, pin-locked shield

One-way travel bug: the exit point landed players directly inside the
destination gate's own iris footprint. Since dialing opens both ends,
arriving there immediately re-triggered the teleport listener and
bounced them straight back - reading exactly like one-way travel.
GateManager.computeSafeLanding now nudges the landing spot along the
player's travel direction until it clears the destination's iris
blocks, and GateTeleportListener adds a short per-player cooldown as a
second guard against re-trigger. Same-server teleports now also
preserve the player's exact yaw/pitch and velocity instead of forcing
a fixed stored orientation, so entering forward always means exiting
forward; the cross-server plugin-messaging protocol was extended to
carry yaw/pitch through the proxy hop for the same reason.

Iris rework to match SG-1 rather than a binary open/closed gate:
- Idle (not connected): iris-idle-material, default AIR - you see
  straight through an inactive ring, not a wall.
- Connected: iris-open-material (WATER, the event horizon) unless the
  gate's separate iris shield is closed, in which case
  iris-shield-material (IRON_BLOCK) blocks travel even though the
  wormhole is active.
- A button placed directly below the control sign toggles the shield
  (GateIrisButtonListener). Closing needs nothing; opening a gate with
  a pin code set (/sg pin <code>) prompts the player to type it in
  chat within gate.pin-timeout-seconds first.

Also: gate.chevron-lit-material default changed from gilded blackstone
to glowstone per feedback.
This commit is contained in:
Michael Burgess
2026-08-09 11:36:17 -04:00
parent 190f875d23
commit b822389387
13 changed files with 387 additions and 70 deletions
+11 -5
View File
@@ -43,12 +43,15 @@ gate:
# than their ring-neighbours - the "elbow" points of the shape, same as a real
# Stargate's chevron placement - then swaps just those to chevron-lit-material while
# dialing/open, restoring whatever they looked like at rest when the gate closes.
chevron-lit-material: GILDED_BLACKSTONE
# The interior ("iris") reflects whether the gate is usable. Closed/idle, it's solid
# bedrock - nothing can walk or fall through it. Only while open does it become
# iris-open-material (the "event horizon") and let players/items pass.
chevron-lit-material: GLOWSTONE
# The interior has three looks, matching SG-1: idle (not connected) is just empty
# air - you can see straight through the ring. Connected, it's the event horizon
# (iris-open-material) UNLESS the iris shield is closed, in which case it shows
# iris-shield-material instead and blocks all travel even though the gate is active.
# The shield is toggled with a button placed directly below the control sign.
iris-idle-material: AIR
iris-open-material: WATER
iris-closed-material: BEDROCK
iris-shield-material: IRON_BLOCK
max-frame-blocks: 300
max-iris-blocks: 200
min-frame-blocks: 8
@@ -58,6 +61,9 @@ gate:
link-timeout-seconds: 30
# How far (in blocks) the punched frame block may be from the sign.
max-link-distance: 64
# If a gate has a pin code set (/sg pin <code>), this is how long a player has to
# type it in chat after pressing the iris button while the shield is closed.
pin-timeout-seconds: 20
dialing:
# Seconds the gate stays open (iris filled) before auto-closing if nobody walks through.