Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0f0ee90
feat(saturation): 新增饱和度显示 HUD,替代原版饥饿条
Serendisand Aug 1, 2026
2b038cd
feat(fog): 新增自定义迷雾模块(颜色/距离/模式)
Serendisand Aug 1, 2026
32ac8fc
feat(autotext): 新增 AutoText 快捷发送模块(按快捷键发送自定义消息)
Serendisand Aug 1, 2026
7227eb0
feat(smtc): 新增 Windows 系统媒体传输控件(SMTC)集成
Serendisand Aug 1, 2026
a836560
fix(blockoverlay): 修复瞄准实体时 objectMouseOver.getBlockPos() 为 null 的 NPE
Serendisand Aug 1, 2026
f62b4c9
Update task list with completed items
Serendisand Aug 1, 2026
27623e7
Merge branch 'main' into main
Serendisand Aug 1, 2026
a7a211a
fix(smtc): 修复 SMTC 原生 ABI 与封面图加载
Serendisand Aug 2, 2026
643fd31
fix(render): 修复自定义迷雾雾色/失明跳过与 HUD 修复
Serendisand Aug 2, 2026
90e33b1
fix(autotext): 修正默认 G 键绑定,新条目不再自动绑键
Serendisand Aug 2, 2026
9edcceb
i18n: 补全语言文件缺失键值
Serendisand Aug 2, 2026
e00cd09
fix(render): 自定义迷雾线性模式推远默认距离并防反转
Serendisand Aug 2, 2026
efd97f1
fix(smtc): WriteAsync 前设置 Buffer.Length
gaoyu06 Aug 2, 2026
f71a95f
fix(smtc): 切歌时清空封面缓存
gaoyu06 Aug 2, 2026
c23a8ee
fix(fog): 复用 fog color buffer
gaoyu06 Aug 2, 2026
47fef9b
fix(saturation): 图标采样跨度与缩放解耦
gaoyu06 Aug 2, 2026
2694fe8
build(smtc): 用 CMake + CI 构建原生库,不再提交 DLL
gaoyu06 Aug 2, 2026
0540a5f
fix(smtc): 专用线程持有 WinRT 套间,并传入真实窗口句柄
gaoyu06 Aug 2, 2026
7e1ae61
fix(saturation): 重定向 pre(FOOD) 而不是在 HEAD 取消
gaoyu06 Aug 2, 2026
56cc029
build(smtc): 改用 C++20 编译原生库
gaoyu06 Aug 2, 2026
352e8bb
refactor(saturation): 只显示饱和度,不再接管原版饥饿条
gaoyu06 Aug 2, 2026
5a10ff2
fix(fog): 一并覆盖天空/清屏色,并复用原版 fog buffer
gaoyu06 Aug 2, 2026
1da11ee
perf(music): 把网络下载移出串行解码线程
gaoyu06 Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,39 @@ env:
ARTIFACT_SOURCE_TYPE: external_url

jobs:
# Windows SMTC bridge DLL. The binaries are not committed to the repository —
# they are built here and injected into src/main/resources before packaging,
# so the shipped jar can never contain a stale binary built from older C++.
build-native:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Build fpsmaster-smtc (x64 + x86)
shell: pwsh
run: |
cmake -S native/smtc -B native/smtc/build-x64 -A x64
cmake --build native/smtc/build-x64 --config Release
cmake -S native/smtc -B native/smtc/build-win32 -A Win32
cmake --build native/smtc/build-win32 --config Release

- name: Collect DLLs
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist/x64, dist/x86 | Out-Null
Copy-Item native/smtc/build-x64/Release/fpsmaster-smtc.dll dist/x64/
Copy-Item native/smtc/build-win32/Release/fpsmaster-smtc.dll dist/x86/
Get-ChildItem -Recurse dist | Select-Object FullName, Length

- name: Upload native artifacts
uses: actions/upload-artifact@v4
with:
name: smtc-native
path: dist
if-no-files-found: error

build:
needs: build-native
runs-on: ubuntu-latest
outputs:
should_publish: ${{ steps.decision.outputs.should_publish }}
Expand Down Expand Up @@ -133,6 +165,26 @@ jobs:
if: steps.decision.outputs.should_build == 'true'
uses: gradle/actions/setup-gradle@v3

- name: Inject SMTC native libraries
if: steps.decision.outputs.should_build == 'true'
uses: actions/download-artifact@v4
with:
name: smtc-native
path: src/main/resources/native/windows

- name: Verify native libraries are present
if: steps.decision.outputs.should_build == 'true'
shell: bash
run: |
for arch in x64 x86; do
dll="src/main/resources/native/windows/$arch/fpsmaster-smtc.dll"
if [ ! -s "$dll" ]; then
echo "Missing or empty $dll — the jar would silently ship without SMTC" >&2
exit 1
fi
echo "$arch: $(stat -c%s "$dll") bytes, sha256 $(sha256sum "$dll" | awk '{print $1}')"
done

- name: Build with Gradle Wrapper
if: steps.decision.outputs.should_build == 'true'
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ remeasure.ps1
/usercache.json
/usernamecache.json
/FPSMaster Edge/

# SMTC 原生库由 CI 构建后注入(native/smtc/CMakeLists.txt),不提交二进制
src/main/resources/native/windows/*/*.dll
native/smtc/build-*/
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ dependencies {
shadowImpl("com.google.zxing:core:3.5.3") {
isTransitive = false
}
// Windows SMTC 桥接:JNA 加载原生 DLL 调用 WinRT。
shadowImpl("net.java.dev.jna:jna:5.17.0") {
isTransitive = true
}
// If you don't want to log in with your real minecraft account, remove this line
runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.2")
compileOnly("org.projectlombok:lombok:1.18.38")
Expand Down
8 changes: 5 additions & 3 deletions docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ FPSMaster v4将会在此列表任务大部分完成后发布
- [ ] 全局搜索
- [x] 新的OOBE
- [ ] 功能完整的饰品界面
- [ ] AutoText
- [ ] 饱和度显示
- [x] AutoText
- [x] 饱和度显示
- [ ] 账号管理界面
- [ ] SMTC支持
- [x] SMTC支持
- [ ] 时间更改模块改为世界更改,添加天气选项(是否和WorldColor模块合并?)
- [ ] 修复歌词渲染等特殊组件可能因glflags状态导致的渲染问题
- [ ] 添加异步光照性能优化
- [x] 添加自定义迷雾(颜色,距离等)
- [ ] 按[性能优化路线图](performance-roadmap.md)推进区块、实体、光照、纹理和画质裁剪工作
- [ ] 添加自定义迷雾(颜色,距离等)
- [ ] 为客户端的组件颜色选择添加彩色选项
Expand Down
43 changes: 43 additions & 0 deletions native/smtc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 3.20)
project(fpsmaster-smtc CXX)

# Windows-only: the whole point of this target is the WinRT SMTC bridge.
if(NOT WIN32)
message(FATAL_ERROR "fpsmaster-smtc is a Windows-only target")
endif()

# C++20, not 17: C++/WinRT's headers pull in coroutine support, and under /std:c++17
# that resolves to <experimental/coroutine>, which current MSVC rejects outright
# (STL1011). C++20 gives it the standard <coroutine> instead.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Architecture is selected by the generator platform, e.g.
# cmake -B build-x64 -A x64
# cmake -B build-win32 -A Win32
add_library(fpsmaster-smtc SHARED
smtc.cpp
smtc.def
)

set_target_properties(fpsmaster-smtc PROPERTIES
PREFIX ""
OUTPUT_NAME "fpsmaster-smtc"
)

target_compile_definitions(fpsmaster-smtc PRIVATE
UNICODE
_UNICODE
WIN32_LEAN_AND_MEAN
NOMINMAX
)

if(MSVC)
# /EHsc: C++/WinRT throws; /MT: static CRT so the DLL does not need the
# VC++ redistributable on the player's machine.
target_compile_options(fpsmaster-smtc PRIVATE /EHsc /W3)
set_property(TARGET fpsmaster-smtc PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
endif()

# WindowsApp.lib provides the WinRT activation/interop entry points.
target_link_libraries(fpsmaster-smtc PRIVATE WindowsApp)
Loading
Loading