Module: Hard Hoof: Portals (hardhoof_portals)
This is the server/client path that makes a doorway show a live far world instead of a flat texture.
When you look through a portal, Hard Hoof subscribes you to destination chunks (and entities), tickets those chunks on the server, and renders a private client view into the aperture. Streaming and viewing are one feature with two sides.
Server: remote world stream
RemoteWorldStreamer runs once per server tick against the authoritative portal registry.
- Viewers within 128 blocks of a source aperture can subscribe (client sends portal ids + desired radius).
-
RemoteSubscriptionManager+RemoteChunkPlannerturn "these portals are visible" into a per-viewer chunk plan: importance from aperture area, distance, and recursion depth; hard budgets so one session cannot ticket unbounded terrain. - Chunks are ref-counted: one ticket no matter how many viewers want a chunk; release only when the last holder lets go.
- Vanilla-shaped packets (chunk-with-light, forget-chunk, entity spawn/data/remove, environment) are wrapped for the remote dimension and budgeted per tick (packet count, encoded bytes, chunks per player).
- Recursion caps: depth 2, up to 8 recursive views, 64-block radius for nested portal discovery.
Ready signalling (RemoteWorldReadyPayload and related) gates seamless crossing: the far world must be loaded on the client before the eye-pass path moves you.
Client: private views
Each visible doorway path gets a PortalView (camera, projection, render target, clip, traversal path) backed by a durable PortalWorldRuntime per level. Multiple doorways into one destination each keep their own renderer slot so they do not fight over section grids.
The aperture composites the destination render target in screen space. Operator helpers: /hardhoofportals preview (fullscreen last view texture), /hardhoofportals clip (toggle oblique doorway clip).
What this is not
Streaming views are not a separate survival item or machine. They are the networking + render stack behind Portals. Runtime dimension creation is covered on Runtime dimensions.