Skip to content

合并 1.21 Kotlin 重写并适配 26.1 - #10

Merged
QiuYe-QAQ merged 8 commits into
26.1from
UpData-26.1-to-1.21-laste
Nov 21, 2026
Merged

QiuYe-QAQ merged 8 commits into
26.1from
UpData-26.1-to-1.21-laste

Conversation

@QiuYe-QAQ

Copy link
Copy Markdown
Member

目的

将 origin/1.21 的 Kotlin 重写与本地化功能合入 26.1 版本线。合并提交包含 26.1 基线 041686c 和 1.21 重写 #9 的 7260636。

实现细节

  • 保持 Minecraft 26.1.2、NeoForge 26.1.2.126 和 Java 25。物品和方块构造属性绑定注册 Key,BlockItem 复用方块的原生翻译 Key。
  • 使用 26.1 的模型、流体模型、刷怪蛋、渲染状态、配方和战利品 API。BlockItem 的默认模型保留方块单变体引用的子目录。
  • 接入独立 localization-processor 子模块,通过 JSR 269 和 KSP 收集注解。Builder、手动声明和注解在 DataGen 按输出目录统一汇总。
  • RegistrateLib 和测试模组的 @Mod 入口使用 Java。测试模组把同一个 Registrate 交给 Kotlin 注册类。

验证

  • build --offline 通过,包含 Spotless。
  • runGameTestServer --offline 的 8 个必需用例全部通过,其中 7 个来自本项目。
  • runTestdata 的全量和服务端模式均通过,使用独立输出目录。

兼容性

从 1.21.1 迁移的调用方需要适配 Identifier、新版着色与刷怪蛋接口,以及烹饪配方的 CookingBookCategory。Java 与 Kotlin 的源码样例及本地化处理器接入见 26.1 迁移说明。

@QiuYe-QAQ
QiuYe-QAQ requested review from a team as code owners November 21, 2026 07:28
@QiuYe-QAQ QiuYe-QAQ added Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release type: refactor Suggestion to refactor a section of code labels Nov 21, 2026
@github-actions github-actions Bot added 26.1 Tests: Passed Game Tests have passed on this PR labels Nov 21, 2026
@QiuYe-QAQ
QiuYe-QAQ merged commit 85d46d6 into 26.1 Nov 21, 2026
4 checks passed
@QiuYe-QAQ
QiuYe-QAQ deleted the UpData-26.1-to-1.21-laste branch November 21, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.1 Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release Tests: Passed Game Tests have passed on this PR type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant