fangorn/huorn-minecraft
public
ref:dad8d800d3ce19b69e6c004d37f56fc36fcb056c
Performance: upload texture once per controller per frame, cache bounds
Before: N blocks in a group each uploaded the same 518K-pixel texture
every frame → O(N * pixels) per frame. For a 3x2 grid, 6 redundant
uploads of 518K pixels = 3.1M pixel writes per frame.
After: frame-local HashSet tracks which controllers have been uploaded.
First block in the group uploads, subsequent blocks skip. 1 upload
per controller per frame regardless of group size.
Also:
- ScreenGroup pre-caches min/max X/Y/Z bounds in constructor
(was creating 6 stream pipelines per getSubRegion call per frame)
- Matrix rain animation updates every other tick instead of every tick
- Terminal fills entire block face (no margin gap)
46 GameTests + 52 Rust tests, all passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SHA:
dad8d800d3ce19b69e6c004d37f56fc36fcb056c
Author:
Cole Christensen <cole.christensen@macmillan.com>
Date:
2026-03-20 17:11
Parents:
8b9d5a7
2 files changed
+69
-85
| Type | ||
|---|---|---|
|
|
common/src/main/java/io/fangorn/alacrittymc/block/ScreenGroup.java | +25 −27 |
|
||