Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:

jobs:
build:
runs-on: windows-2022
runs-on: windows-latest
strategy:
matrix:
target_type:
- server
# - client
steps:
- uses: actions/checkout@v7

Expand All @@ -24,22 +29,23 @@ jobs:
restore-keys: |
xmake-

- run: |
xrepo clean --cache -y
xmake global --policies=package.precompiled:n
- name: Setup LLVM
uses: ZhongRuoyu/setup-llvm@v0
with:
llvm-version: 22

- run: |
xmake repo -u

- run: |
xmake f -a x64 -m release -p windows -v -y
xmake f -a x64 -m release -p windows -v --target_type=${{ matrix.target_type }} -y

- run: |
xmake -v -y

- uses: actions/upload-artifact@v7
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ matrix.target_type }}-windows-x64
path: |
bin/

Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ on:

jobs:
build:
runs-on: windows-2022
runs-on: windows-latest
strategy:
matrix:
target_type:
- server
# - client
steps:
- uses: actions/checkout@v7

- uses: xmake-io/github-action-setup-xmake@v1
# with:
# xmake-version: branch@master

- uses: matbour/setup-sentry-cli@v2
with:
token: ${{ SECRETS.SENTRY_TOKEN }}
Expand All @@ -26,15 +32,16 @@ jobs:
restore-keys: |
xmake-

- run: |
xrepo clean --cache -y
xmake global --policies=package.precompiled:n
- name: Setup LLVM
uses: ZhongRuoyu/setup-llvm@v0
with:
llvm-version: 22

- run: |
xmake repo -u

- run: |
xmake f -a x64 -m release -p windows -y --publish=y
xmake f -a x64 -m release -p windows --target_type=${{ matrix.target_type }} -y --publish=y

- run: |
xmake -w -y
Expand All @@ -43,7 +50,7 @@ jobs:

- uses: actions/upload-artifact@v7
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ matrix.target_type }}-windows-x64
path: |
bin/

Expand All @@ -68,23 +75,28 @@ jobs:
- update-release-notes
permissions:
contents: write
strategy:
matrix:
target_type:
- server
# - client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/download-artifact@v8
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ matrix.target_type }}-windows-x64
path: artifact

- run: |
cp CHANGELOG.md LICENSE README.md artifact/

- run: |
zip -r ../${{ github.event.repository.name }}-windows-x64.zip *
zip -r ../${{ github.event.repository.name }}-${{ matrix.target_type }}-windows-x64.zip *
working-directory: artifact

- uses: softprops/action-gh-release@v3
with:
files: |
${{ github.event.repository.name }}-windows-x64.zip
${{ github.event.repository.name }}-${{ matrix.target_type }}-windows-x64.zip
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [未发布]

### 更改

- 重构语言文件结构:界面、命令、日志、统计分类与通用统计分别使用嵌套键;Minecraft 名称按 `block`、`item`、`entity` 分类。
- 更新简体中文、繁体中文(香港)与繁体中文(台湾)的 Minecraft 官方译名数据。

### 修复

- 修复物品/方块混合统计在缺少物品译名时显示 `item.minecraft:<id>`,而不回退到方块译名的问题。

## [0.10.0] - 2026-09-12

## 新增

- 适配LeviLamina 26.32

## [0.9.0] - 2026-07-05

### 新增
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,34 @@ const rank3 = getRankData(2,""); // 挖掘排行榜
| ENTITY_KILLED | 与玩家杀死的实体数量相关的统计信息 | minecraft:killed |
| ENTITY_KILLED_BY | 与玩家被实体杀死相关的统计信息 | minecraft:killed_by |

### 语言文件对象键

统计数据和 RemoteCall API 中的对象键仍为原始命名空间 ID,例如 `minecraft:arrow`。语言文件会按用途及来源嵌套:界面为 `gui`,命令为 `command`,日志为 `log`;统计分类标题为 `stats.category`,通用统计项为 `stats.custom`。方块和物品有时使用相同的 ID,有时不同,因此按来源分为 `block`、`item`、`entity` 三组,避免同一 ID 时互相覆盖:

```json
{
"stats": {
"category": {
"used": "物品使用"
},
"custom": {
"minecraft:jump": "跳跃次数"
}
},
"block": {
"minecraft:stone": "石头"
},
"item": {
"minecraft:arrow": "箭"
},
"entity": {
"minecraft:arrow": "射出的箭"
}
}
```

加载时会将嵌套对象展开为内部翻译键。统计存档和 RemoteCall API 的字段不变:`mined` 使用 `block`,`broken` 使用 `item`,`killed` 与 `killed_by` 使用 `entity`;`crafted`、`used`、`picked_up`、`dropped` 会依次查询 `item` 与 `block`;通用统计使用 `stats.custom`。为兼容旧语言文件,未找到新键时仍会回退到原本的裸 `minecraft:<id>` 键。

### 统计信息列表

| 统计名称 | 描述 | 命名空间 |
Expand Down
Loading