Repository navigation
fix(replay): 进入回放前先退出当前世界或服务器 - #6
Merged
Merged
Conversation
在已连接世界或服务器时打开回放会留下原通道继续发包。 playback.open 先断开现世/服务器,再创建 isolated listener。 Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
1.21.11 / 26.2 的 Minecraft.disconnect 参数是 Screen 而非 Screen?。 回放 seek 重建时当前连接已是 EmbeddedChannel,不能再当现世断开。 Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
各版本 Yarn 里 channel 都是 Channel 属性,channel() 会被当成对 Channel 做 invoke。 Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
channel 在各版本都是私有字段。现世只在第一次 open 时断开, seek 重建只重建 isolated session,不再走 disconnect。 Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在世界或服务器里点播放时,
ReplayPlayback.open()会直接建 IsolatedSession,不会断开当前连接。旁观/镜头移动仍走原来的mc.connection,表现为飞行等异常。改动
ReplayPlayback.open()在创建 isolated listener 之前先leaveCurrentSession():level/player/connection时走现有 Shortcut 同款断开:mc.disconnect(当前屏幕, false)(1.20.5+),更早版本clearLevelrebuild()(后退 seek)也会再走open(),此时现世已卸掉,方法是空操作或只清残留回放世界验证
范围
只改 Nova 回放进入路径。Edge 同问题见 FPSMaster-Edge#187。