Skip to content

(remote viewing) updates to the mc package#22

Open
verbiiii wants to merge 24 commits into
mainfrom
xpy-modules
Open

(remote viewing) updates to the mc package#22
verbiiii wants to merge 24 commits into
mainfrom
xpy-modules

Conversation

@verbiiii
Copy link
Copy Markdown
Collaborator

@verbiiii verbiiii commented May 28, 2026

  1. add inventory and items API with parsed meta json

@verbiiii
Copy link
Copy Markdown
Collaborator Author

verbiiii commented Jun 1, 2026

this video was published at approximately this point in the code https://youtu.be/3G06jvit6Po

@verbiiii
Copy link
Copy Markdown
Collaborator Author

verbiiii commented Jun 3, 2026

Minecraft Rendering Notes

This document tracks the current split vision stack and the historical commit lineage.

Current branch snapshot:

  • Current commit: 5020512c394d8c4f4b27b93d6f6659cfc16606a0
  • Both renderers now exist in the same branch/commit:
    • EntityVision.java
    • WorldVision.java
  • Runtime selection is currently in XosViewportRuntime.renderAgentViewRgbaHex(...) and flushDeferredVisionCaptures(...) with an easy comment swap.

1) Entity Rendering

What EntityVision does now

EntityVision is the camera-driven render-pass path intended for accurate POV rendering:

  • Per-camera context (CameraContext) keyed by agent UUID.
  • Offscreen TextureTarget lifecycle management.
  • Render-thread scheduling (queueCapture + flushDeferredCaptures) so world pass work stays on the correct thread.
  • Capture using actual game render invocation (renderLevel) and readback.

Tiny internals example:

camera.target = new TextureTarget(width, height, true, Minecraft.ON_OSX);
mc.setCameraEntity(cameraEntity);
gameRendererRenderLevelMethod.invoke(mc.gameRenderer, args);
GL11C.glReadPixels(..., GL11C.GL_RGBA, GL11C.GL_UNSIGNED_BYTE, buf);

Why EntityVision is the "accurate entity" direction:

  • It is camera-entity based (agent POV), not just projected world math.
  • It uses renderer passes rather than hand-authored entity shapes.
  • It keeps per-camera state and deferred capture semantics needed for correctness.

2) World Rendering

What WorldVision does now (ported from 4c790a70... lineage)

WorldVision keeps the block-state ray/clip approach from the b30d00d9... and 4c790a70... line:

  • Per-pixel world ray casting using ClipContext.
  • Block color from MapColor with registry-hash fallback.
  • Distance and face-based shading for depth/readability.
  • Entity overlay rendered as projected disks (orbs) with depth checks.

Tiny world hit example:

var hit = mc.level.clip(new ClipContext(origin, rayEnd, OUTLINE, NONE, agent));
BlockPos bp = hit.getBlockPos();
int rgb = rgbFromBlockState(mc, bp, state);

Tiny orb overlay example:

int color = rgbFromEntity(e);
if ((dx * dx + dy * dy) <= rr && camZ < depth[p]) {
  // paint projected entity disk
}

What WorldVision gives:

  • World state structure that is close to live block layout.
  • Stable, readable rendering and predictable performance shape.
  • Explicit fallback behavior that is easy to reason about.

What WorldVision does not provide:

  • Mesh/textured entity rendering.
  • Full native-frame parity with Minecraft's standard on-screen camera pass.

EntityVision vs WorldVision

Both renderers now exist side by side in one branch so each can be stabilized independently.

  • EntityVision

    • Camera/render-pass architecture (renderLevel + offscreen target + readback).
    • Best path toward true POV fidelity (including proper entity rendering).
    • More sensitive to render-thread/target-state correctness.
  • WorldVision

    • Deterministic ray/clip world sampler with shaded block colors.
    • Entity visibility via synthetic projected orbs.
    • Easier to reason about for world-state output and debugging.

This split is intentional: verify each path independently, then merge strengths into one robust final renderer.

@verbiiii verbiiii changed the title updates to the mc package (remote viewing) updates to the mc package Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant