remove spectrum#114
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| int32(math.Floor(float64(gameData.PlayerPosition.Z()))) >> 4, | ||
| }, | ||
| Radius: uint32(chunkRadius * 16), | ||
| }) |
There was a problem hiding this comment.
NetworkChunkPublisherUpdate position uses chunk coordinates instead of block
High Severity
The NetworkChunkPublisherUpdate.Position field is a protocol.BlockPos and expects block coordinates, but the >> 4 shift converts block coordinates to chunk coordinates. For a player at X=100, Z=200, the position would incorrectly be set to (6, 0, 12) instead of (100, 0, 200). This means after a fast transfer, the chunk publisher center would be far from the player's actual position, preventing chunks from loading around them.
|
Any updates on how this is going to span out? @HashimTheArab |


Note
Medium Risk
Medium risk: introduces new connection-swapping logic (
TryTransfer) with packet ID translation and state resets, which can affect gameplay/network correctness during transfers; also bumps core networking deps (gophertunnel,go-raknet).Overview
Removes Spectrum support entirely (deletes
spectrum.goandexample/spectrum, trims README dependencies, drops Spectrum/legacy-version modules) and updates.gitignoreaccordingly.Adds fast upstream transfer support: the player now handles server
Transferpackets by dialing a new upstream connection (TryTransfer), swappingServerConn, invalidating ACKs, and clearing client-visible state (chunks/entities/bossbars/player list/objectives/effects/weather) before resyncing basic gamemode/rules/position and chunk radius.Implements transfer-safe entity ID handling by tracking client vs server runtime/unique IDs (
ClientRuntimeId,ClientUniqueId,IDModified) and translating relevant client/server packets during transfers; also addsWorld.ChunkPositions()andWorldUpdaterComponent.ResetForTransfer()to reset stale world-updater state.Written by Cursor Bugbot for commit fdce35d. This will update automatically on new commits. Configure here.