Skip to content

session/tracker.go: clear debug shapes on transfer - #42

Merged
cooldogedev merged 3 commits into
cooldogedev:mainfrom
LucianoMejia:fix/clear-shapes
Oct 7, 2026
Merged

cooldogedev merged 3 commits into
cooldogedev:mainfrom
LucianoMejia:fix/clear-shapes

Conversation

@LucianoMejia

@LucianoMejia LucianoMejia commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Debug shapes (PrimitiveShapes) stay on the client's screen after a transfer
or fallback. The tracker clears entities, effects, boss bars, players and
scoreboards in sendGameData, but not shapes, and the new server can't remove
them because it never sent them.

Changes

  • The tracker records the shapes sent by the server, by network ID with their
    dimension. A shape without a type is a removal, so it's forgotten.
  • clearShapes sends a removal for every tracked shape in sendGameData,
    along with the rest of the tracked state.

Notes

Requires PrimitiveShapes to be decoded by the proxy, which spectrum-df
enables in cooldogedev/spectrum-df#18.

- The tracker records PrimitiveShapes (a shape without a type is a
  removal) and removes them from the client in sendGameData, like
  entities, scoreboards and effects
- Before, the client kept the shapes of the old server after a
  transfer or fallback, and the new server couldn't remove them
@cooldogedev
cooldogedev merged commit 328844c into cooldogedev:main Oct 7, 2026
1 check failed
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.

2 participants