Repository navigation
fix(mod): 修复 NeoForge 在线统计查询及异步命令输出丢失 - #16
Closed
BaizhouziYou wants to merge 1 commit into
Closed
BaizhouziYou wants to merge 1 commit into
BaizhouziYou wants to merge 1 commit into
Conversation
- 修正 NeoForge Mixin 配置声明,恢复在线玩家统计接口注入 - 按配置的等待时间收集命令输出,保留同步提示和后续异步结果 - 将命令上下文创建移至主线程,并对输出列表加锁、返回独立快照 - 补充回归检查脚本及等待时间说明
BaizhouziYou
force-pushed
the
codex/fix-statistics-async-output
branch
from
October 2, 2026 04:02
b188931 to
0e908a7
Compare
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.
变更内容
[[mixin]]改为[[mixins]]command.waitTime秒内的同步和异步输出问题原因
NeoForge 未识别原有的 Mixin 配置声明,导致
ServerStatsCounterAccessor未注入,在线玩家统计查询时抛出ClassCastException异步命令原先在首条异步消息到达时就返回结果;如果先产生同步提示,也会立即结束收集,遗漏后续输出
影响
waitTime为 0 或负数时不额外等待;超出收集时间的输出不会包含在结果中验证
tests/check-regressions.ps1:异步及混合输出、排队等待、无输出、零/负等待、异常传播和并发快照:1.21-fabric:remapJar:1.21-neoforge:shadowJar:26.3-neoforge:compileJava%ez-statistic_jump%返回预设值7git diff --check测试说明
测试环境为 Windows、Java 21.0.10、Minecraft 1.21.1,分别使用 NeoForge 21.1.252 和 Fabric Loader 0.19.5 / Fabric API 0.116.17+1.21.1
构建使用 Java 25.0.3、Gradle 9.7.0
关联 issue
ez-statistic查询在线玩家papi失败 easybot-issues#88