Package ke.ric.renderer.api
Class MapFrame
java.lang.Object
ke.ric.renderer.api.MapFrame
Immutable 128×128 Minecraft map palette plus the original frame that produced it. Stream sinks
receive an aspect-fitted image with black letterboxing, without allocating or saving map items.
The constructor and palette accessor copy bytes, so callers cannot change a published frame.
-
Constructor Summary
ConstructorsConstructorDescriptionMapFrame(byte[] palette, RenderedFrame source) Copies exactly one map's palette and retains immutable source evidence. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the source camera sample time, not the palette-conversion time.byte[]palette()Returns a defensive copy of the row-major 128×128 palette.longReturns the source frame's publication-admission time, not this sink's callback time.Returns original native pass evidence and final composed colour pixels.longReturns the original world-evidence time; scene reuse does not renew it.
-
Constructor Details
-
MapFrame
Copies exactly one map's palette and retains immutable source evidence.- Parameters:
palette- exactly 16384 row-major Minecraft map-palette bytessource- source frame, including original passes and final colour pixels- Throws:
IllegalArgumentException- if palette has the wrong sizeNullPointerException- if palette or source is null
-
-
Method Details
-
palette
public byte[] palette()Returns a defensive copy of the row-major 128×128 palette.- Returns:
- exactly 16384 map-palette bytes
-
sourceFrame
Returns original native pass evidence and final composed colour pixels.- Returns:
- the immutable frame from which this palette was converted
-
cameraCapturedNanos
public long cameraCapturedNanos()Returns the source camera sample time, not the palette-conversion time.- Returns:
- a System.nanoTime() timestamp within this server process
-
worldCapturedNanos
public long worldCapturedNanos()Returns the original world-evidence time; scene reuse does not renew it.- Returns:
- a System.nanoTime() timestamp within this server process
-
publishedNanos
public long publishedNanos()Returns the source frame's publication-admission time, not this sink's callback time.- Returns:
- a System.nanoTime() timestamp within this server process
-