feat: 新增 Settings.negative-entity-id 配置项,允许使用正数虚拟实体 ID#120
Open
zhibeigg wants to merge 1 commit into
Open
Conversation
部分客户端 mod(如 DragonCore)无法处理负数实体 ID,导致无法在 Adyeshach 单位上渲染模型。新增配置项 negative-entity-id(默认 true,保持现状), 设为 false 时改用正数 ID,基数抬到 15 亿以尽量避免与服务端真实实体 ID 冲突。 Closes TabooLib#119
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.
背景
关联 #119
2.1.30(commit300420f5)将impl/util/Indexs.kt的nextIndex()改为返回负数虚拟实体 ID,用于避开服务端真实实体 ID / 全息撞 ID。但部分客户端 mod(如 DragonCore 龙核)无法处理负数实体 ID,导致这些 mod 无法在 Adyeshach 单位上渲染模型(例如经 Orryx 的 DragonCore 桥套模型时只显示原始实体)。
改动
新增配置项
Settings.negative-entity-id:true,保持现状、完全向后兼容(负数 ID)。false时改用正数 ID,基数自动抬到1_500_000_000,以尽量避免与服务端真实实体 ID(从低位递增)冲突。涉及 3 个文件:
core/config.yml:新增带注释的配置项AdyeshachSettings.kt:新增negativeEntityId绑定Indexs.kt:基数与正负号按配置决定(初始化时缓存,保证同一会话内一致)测试
false后,Adyeshach 单位经 DragonCore 正常渲染模型(此前只显示盔甲架):project:common与:project:common-impl编译通过Closes #119