Table of Contents

Rendering Notes

This document describes the current Stargate rendering implementation. The renderer is functional and visually close to the intended direction, but it is still a procedural prototype rather than a final model/rendering architecture.

Renderer Registration

LanteaCraftClient.registerRenderers registers:

ModBlockEntities.STARGATE_BASE -> StargateBaseRenderer

Only the base block has a block entity. The full rendered Stargate ring is therefore anchored to the base block entity, not to each individual frame block.

StargateBaseRenderer Responsibilities

StargateBaseRenderer currently owns all assembled-gate visual rendering:

The normal stargate_base, stargate_ring, and stargate_chevron block models still exist, but the assembled gate's main visual identity is the BER.

Coordinate System

The renderer exits early unless the base block has assembled=true.

For assembled gates it:

  1. translates to the base block center and raises the origin to the ring center:
    • translate(0.5, 3.5, 0.5)
  2. rotates around Y by the negative base facing yaw
  3. draws the procedural ring in local XY with depth on local Z

Important dimensions:

Textures And RenderTypes

Frame/ring/chevrons:

textures/tileentity/stargate.png
RenderType.entitySolid

Glyph ring:

textures/tileentity/stargate_glyphs.png
RenderType.entityCutout

Event horizon/kawoosh:

textures/fx/eventhorizon.png
RenderType.entityTranslucent

The frame texture is treated as a 16×16 tile atlas inside a 1024×1024 image. Tile constants select areas for outer ring, face, inner ring, unlit chevrons, and lit chevrons.

Shell Geometry

renderShell builds the ring from 38 radial segments.

For each segment it emits quads for:

Lighting is forced to LightTexture.FULL_BRIGHT for the Stargate mesh, so the ring remains readable independent of world lighting.

Prototype Quality

Glyph Ring And Dialing Rotation

renderGlyphRing draws a textured annular band over the moving ring area.

During dialing:

When connected and not dialing:

Prototype Quality

Chevron Rendering

renderChevrons places nine chevrons around the ring.

Chevron constants:

Each chevron:

Implemented

Prototype Quality

Event Horizon

The event horizon is drawn only when:

renderEventHorizon draws:

The steady puddle:

The puddle does not spin as a whole. It ripples by changing per-vertex Z offset and UV sampling over time.

Prototype Quality

Kawoosh

The kawoosh is also procedural.

Current behavior:

Core methods:

The shape is a center-heavy protrusion plus a smaller rim bulge and animated wave.

Prototype Quality

Needs Testing

Bottom Camouflage Rendering

Bottom-row camouflage is stored on StargateBaseBlockEntity as a single BlockState.

renderBottomCamouflage renders seven copies of that block across local x=-3..3, at the bottom row of the gate.

The renderer uses Minecraft's block renderer:

Minecraft.getInstance().getBlockRenderer().renderSingleBlock(...)

Each rendered camouflage block is slightly scaled up (1.004) to reduce fighting with existing blocks/models.

Prototype Quality

Culling And Bounds

The renderer overrides:

The bounds are:

new AABB(basePos).inflate(5, 5, 5).expandTowards(0, 6, 0)

This was added because the gate mesh is much larger than the base block and otherwise disappears when the base block leaves the camera frustum.

Prototype Quality

Sound-Driven Visual State

Visual state is primarily derived from StargateBaseBlockEntity:

Server-side BE tick plays sounds:

The renderer does not play sounds. It only visualizes the same BE state.

Known Risks And TODOs

Current Risks

TODO Candidates