Commit Graph
7 Commits
Author SHA1 Message Date
selimaj-devandclaude 9e3bf14ffa Stop per-frame player lookups and make shared state thread-safe
SaturnPlayer stored non-Saturn players as null, which looked the same as
"not fetched yet", so every render re-queued them and flooded the server
with get_player requests. Remember negative lookups and re-check them
after 60 s, retry failed lookups after 5 s, queue each player at most
once, skip lookups while disconnected, and replace the hand-rolled worker
thread with a single-thread executor.

getPlayer now returns null only when the server says the player isn't on
Saturn and throws on failure, so failures are retried instead of cached.

Make state shared between network callbacks and the render thread safe:
ConcurrentHashMap for players, CopyOnWriteArrayList for owned cosmetics,
volatile session/uuid and cosmetic fields, and run emote notifications
on the client thread.

Refs saturnclientmc/saturnclient#2, saturnclientmc/saturnclient#6

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 14:00:29 +02:00
selimaj-dev 2b6194223a Sanitized cloaks and hats 2026-03-23 20:51:00 +01:00
selimaj-dev 9064238c3a Bucket preview and end texture 2026-03-21 14:36:59 +01:00
selimaj-dev ddc48eaf34 Cloak previews 2026-03-21 14:00:51 +01:00
selimaj-dev 1a1f4f07a3 bucket hat 2026-03-21 13:12:18 +01:00
selimaj-dev ff516e3feb End materials and cloaks 2026-03-21 10:57:00 +01:00
selimaj-dev 9c6deeb5c0 Moved hats and emotes to common 2026-03-07 18:19:25 +01:00