Repository navigation
feat(handbook): 同步 #5997 手册机器与仓储飘升机改进到 1.21 - #6001
Conversation
- 同步中英文机器章节和蓝图,并适配 1.21 实体、告示牌及库存数据 - 合并容器升级 JEI 分类,保留升级材料与条件提示 - 同步仓储整合器缓存映射、直连核心和飘升机上升限制 - 允许铁砧破坏掉落物被吸附并调整方块放置器抗爆性 - 升级 Ageratum 至 1.21 对应的 build.137
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Gugle2308
left a comment
There was a problem hiding this comment.
结论:REQUEST_CHANGES。1.21 回移整体结构正确,整合器逐槽映射、直连核心,JEI 合并,铁砧掉落吸附,方块放置器 15F 抗爆和手册页面都与 #5997 对应;但飘升机的 getGridAscent 在没有相交部件时返回 0 的 🔴 与 #5997 相同,另有两处 1.21/26.1 分支差异需要确认。
🔴 1. IonocraftEntity.getGridAscent 没有相交部件时返回 0(与 #5997 同源,未修)
PowerGrid.getComponents()只有方块部件;飘升机自己的DynamicPowerComponent在dynamicComponents里,不进入这个流;SimplePowerGrid.getPowerComponentInfoList同样只有方块部件。- 常规场景:飘升机停在机器上方,探测盒(
box.maxY往上)不与任何机器 AABB 相交 →ranges为空 →uncovered仍是probe→uncovered.min(Y)-box.maxY-ASCENT_GAP=-0.01→Math.max(0,...)=0→limitGridAscent把delta.y清零,飘升机永远升不起来(只有被高大机器 AABB 罩住或穿在机器里才会返回非零)。 - 修复:没有 range 与 probe 相交时直接
return ascent;只有确实有部件在探测盒内才按uncovered.min(Y)截断。
limitGridAscent 的 AABB 与服务端 IPowerComponent.getShape() 不一致
- 服务端用
powerGrid.getComponents().stream().map(IPowerComponent::getShape):默认AABB.ofSize(pos.getCenter(), range, range, range),尺寸 =range。 - 客户端用
new AABB(info.pos()).inflate(info.range()):以方块 1×1×1 为基准向四周扩range,尺寸 =1 + 2×range。 - 同一
range下客户端探测盒明显更大,上升限制比服务端宽松,预测与实际可能不一致(客户端先升、服务端再拉回)。26.1 的对应实现用PowerComponentInfo::boundingBox,1.21 的PowerComponentInfo若没有等价方法,建议改为与服务端同式的AABB.ofSize(info.pos().getCenter(), info.range(), ...)或补一个boundingBox访问器。
- 本 PR 把 1.21 的
sized(0.75, 0.75)改成0.98×0.98;#5997 在 26.1 是改成0.75×0.48。两边模型/渲染不同可以解释,但 PR 描述写“同步 #5997 的…飘升机改动”,建议明确这是 1.21 模型适配而非直接同步,避免后续对账时误判。 - 1.21 的
eyeHeight 0.5625 < 0.98,没有 26.1 那个“眼睛高于碰撞箱”的问题,这点无需改。
.nbt 蓝图里的实体(船、悬挂实体、告示牌文本、炼药锅输出口、管道 BE)暂时不会在手册里显示
- PR 描述已明确说明依赖 Anvil-Dev/Ageratum#53,并计划在其合并发布后再升级 Ageratum;本 PR 的
.nbt方块部分可用,实体预览是已知缺口。建议合并前确认维护者接受这个阶段性限制,或等 #53 发布后一起升版本。
💡 5. 手册 203_netherite_block.md 的英文 “respectively..” 多了一个句点
- 建议改为 “respectively.”。
✅ 已核对
StoragePortConsolidatorBlockEntity(1.21 IItemHandler 版):itemPorts()按标记优先排序、bufferPort(slot)=itemPorts().get(slot/32)、bufferSlot(slot)=slot%32;getSlots/getStackInSlot/insertItem/extractItem/getSlotLimit/isItemValid全部走同一映射;insertItem现在写port.getBuffer().insertItem(bufferSlot(slot), ...),逐槽语义保留;直连核心getDirectStorageHandler走Storages.getOrCreate(...).getItems();与 PR 描述的“缓存映射、直连仓储、标记过滤、优先级、逐槽模拟”一致。IonocraftEntity:CONSUMPTION保持 1.21 的 2;getBlockAscent/ascentDelay/move的实体积木碰撞截断、4 tick 延迟、按实际movedY托举、clientCompute的working语义正确(getGridAscent的问题见 🔴 1)。- JEI:
ContainerUpgradeCategory/Recipe与CONTAINER_UPGRADE类型删除干净;ItemInjectCategory用两个合成RecipeHolder复用item_inject分类,1.21 的RecipeType/ResourceLocation/addItemStack/RenderSupport.renderBlock适配正确;预览状态、扩展槽位、六个 catalyst、lang 清理都齐全。 - 铁砧破坏掉落:
AnvilUtil.dropItems换成按maxStackSize拆分的ItemEntity,并anvilcraft$setIsAdsorbable(true);无AnvilUtil残留。 ModBlocks:BLOCK_PLACER加explosionResistance(15F),PR 描述已声明。- 手册:
002_stone/201_netherite_block已无引用;003_sand/022_mesh/101_piezoelectric/201_gem/210_tree的.nbt引用与新增文件对应;202_ancient_debris/203_netherite_block的新页面与009/001_basic_minerals/210_netherite_ingot的链接一致;203的中文“粗金块”与 1.21 机器一致。 - gradle:
ageratum121→137、anvillib保持 649,与 PR 描述一致。
📝 建议补测
- 飘升机:停在机器上方(无部件在探测盒内)应正常上升;在高大机器下方应被截断;客户端与服务端上升高度一致(对应
⚠️ 2)。 - 整合器:
insertItem(slot)后立即getStackInSlot(slot)应看到刚插入的物品;直连核心 vs 有端口两种形态的getSlots/insert/extract;标记端口核心输出槽不再暴露的兼容性。 - 手册:中英文
202/203/210/101/003/022的 structure 渲染;Ageratum#53 合并后确认.nbt实体预览。 - JEI:容器升级两个条目在
item_inject分类中的图标/预览/扩展槽 tooltip。
将 #5997 的手册机器、仓储整合器、JEI 容器升级和飘升机改动同步到
dev/1.21/1.6,并适配 1.21.1 的物品能力和实体数据格式。依赖:Ageratum 更新至 1.21 已发布的
build.137;AnvilLib 保留 1.21 当前的snapshot.649。结构实体预览的配套移植见 Anvil-Dev/Ageratum#53,需该 PR 合并发布后再将本 PR 的 Ageratum 版本更新为包含该修复的版本。当前build.137尚不包含实体预览支持。验证:
./gradlew.bat compileJava --console=plain、./gradlew.bat runData --console=plain通过;检查生成差异并排除主线已有的无关语言生成变化。git diff --check通过。测试通过临时 Gradle 初始化脚本运行,测试脚本未纳入本 PR。未启动游戏客户端,JEI 和手册渲染画面尚未实机验证。