Class MapFrame

java.lang.Object
ke.ric.renderer.api.MapFrame

public final class MapFrame extends Object
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

    Constructors
    Constructor
    Description
    MapFrame(byte[] palette, RenderedFrame source)
    Copies exactly one map's palette and retains immutable source evidence.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the source camera sample time, not the palette-conversion time.
    byte[]
    Returns a defensive copy of the row-major 128×128 palette.
    long
    Returns the source frame's publication-admission time, not this sink's callback time.
    Returns original native pass evidence and final composed colour pixels.
    long
    Returns the original world-evidence time; scene reuse does not renew it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MapFrame

      public MapFrame(byte[] palette, RenderedFrame source)
      Copies exactly one map's palette and retains immutable source evidence.
      Parameters:
      palette - exactly 16384 row-major Minecraft map-palette bytes
      source - source frame, including original passes and final colour pixels
      Throws:
      IllegalArgumentException - if palette has the wrong size
      NullPointerException - 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

      public RenderedFrame 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