Support repeated projection of blueprints and improve runtime status and entity restoration 支持蓝图重复投影并完善运行状态与实体恢复 - #4971
WhereisFff wants to merge 1 commit into
Conversation
- 支持拖拽平铺蓝图投影、松开锁定并再次右键批量粘贴,统一预览与放置范围限制 - 完善选区距离锁定、方向调整和尺寸显示,同步更新操作提示与中英文翻译 - 统一结构扫描快照采集,保存并恢复方块运行进度、计划刻与时间基准,兼容 Litematica 计划刻导入 - 完善建造后的红石、流体与邻居更新,避免恢复结构时误触发侦测器 - 扩展生物、掉落物、投射物、移动方块及模组实体的蓝图建造,恢复运动状态、乘骑关系和实体引用 - 支持树脂封存生物供料,补全实体装备、库存、流体及特殊方块材料需求 - 增加磁铁、铁砧锤与点火工具需求校验,并显示不支持建造的具体对象 - 将实体纳入建造撤销,仅撤销状态未变化且允许修改的建造组 - 蓝图导出遇到同名文件时自动添加序号,并反馈实际导出文件名
Reason: Security scan — [HIGH] Pipe to interpreter: curl | python3: Command pipes output from 'curl' directly to interpreter 'python3'. Downloaded content will be executed without inspection. Reply |
Reason: shell execution via heredoc Reply |
|
I have everything I need. Writing the review now. 代码审查摘要 — PR #4971操作: opened( ✅ 已核对的编译面(无问题)用官方 1.21.1
📋 声称验证表
🔴 关键
|
| 被测目标 | 建议场景 | 优先级 |
|---|---|---|
BlueprintPlacement.tile |
锚点=last(单份)、±X/Z 平铺、Y 向堆叠、count*entries 刚好越界、跨 4000 上限 |
🔴 |
planBlueprint 实体分支 |
范围内放风弹/烟花火箭/凋灵之首,确认是“跳过”还是“整盘失败”(当前实现验证 🔴1) | 🔴 |
BlueprintEntities.flatten/link |
三阶乘骑(船→马→玩家)、自引用/循环乘骑、>32 层嵌套、缺 UUID 的实体、同锚点重复粘贴的 UUID 复用 | 🔴 |
BlueprintTicks.capture/restore |
边界跨区块的计划刻、delay=0、流体/方块双类、还原后立即 tick 的行为、被 cells 过滤掉的方块上的计划刻 |
🟡 |
BlueprintRuntimeData.restoreClock |
capturedAt=0(Litematica 导入)与有捕获时间的两种路径、RemainingWaitingTime>0、熔炉 BurnTime/CookTime 经“库存插入后”不被清零 |
🟡 |
BuildingCommit.activate |
侦测器相邻放置不翻转、红石线网络恢复、含水方块不流水、计划刻不被重复调度 | 🟡 |
StructureBlueprintFiles.write |
同名连续导出 3 次 → _1/_2 序号与回显文件名、超长名截断到 128、并发同名 |
🟢 |
结论: REQUEST_CHANGES
功能覆盖与 PR 声称一致,坐标系/时序这类最容易出错的点做得相当扎实。但 🔴1(个别不支持实体会让整份蓝图静默失败,且触发面因 isTransient 放宽而扩大) 与
PR 标题「Support repeated projection of blueprints and improve runtime status and entity restoration 支持蓝图重复投影并完善运行状态与实体恢复」与变更内容相符,无需修改。
由 Hermes Agent 审查
代码审查摘要 — PR #4971操作: edited(标题/分支变更 → 全量复审)
🔴 关键未发现确定性阻断缺陷(未发现必然崩溃/数据丢失的硬 bug)。
|
| 声称 | 状态 | 对应实现 |
|---|---|---|
| 拖拽平铺投影、松开锁定再右键批量粘贴、统一预览与范围限制 | ✅ | BlueprintPlacement.tile、BuildingRodClient.beginBlueprintSelection/confirmSelection/blueprintPlacements、BuildingRodPacket.PLACE_BLUEPRINTS、BuildingRodService.blueprints |
| 选区距离锁定、方向调整、尺寸显示 | ✅ | canAdjustDistance/controlAvailable/selectionOffset、selection_size 三参数文案 |
| 同步更新中英文翻译 | en_us/en_ud/生成器 ✅;zh_cn 未更新(见 |
|
| 统一结构扫描快照采集 | BlueprintCapture.capture 接入服务端保存;客户端预览仍走缓存(见 |
|
| 保存/恢复运行进度、计划刻、时间基准,兼容 Litematica 计划刻导入 | ✅ | BlueprintRuntimeData、BlueprintTicks、LitematicaImporter(PendingBlockTicks/PendingFluidTicks)、StructureSnapshot.capturedAt |
| 建造后红石/流体/邻居更新,避免误触发侦测器 | ✅(性能见 💡) | BuildingCommit.activate/activatePlaced、BlueprintLevelMixin#neighborShapeChanged |
| 扩展生物/掉落物/投射物/移动方块/模组实体建造,恢复运动状态/乘骑/引用 | DynamicBuildingEntities、BuildingEntityTransform(Motion/BlockPos/SlidingBlocks/记忆);语义变化见 |
|
| 树脂封存生物供料,补全装备/库存/流体/特殊方块材料 | ✅ | reserveCreature、BlueprintSpecialBlocks、Mob 装备/InventoryCarrier 剥离与回填、FluidTankMinecartEntity 储罐 |
| 磁铁/铁砧锤/点火工具校验 + 显示不支持对象 | ✅ | requiredTool/requiresHammer、reserveIgnitions、unsupported_type |
| 实体纳入建造撤销(仅未变化且可修改的组) | 已实现 recordEntity/SavedEntity,但状态门使实体组实际不可撤销(见 |
|
| 导出同名自动加序号并反馈实际文件名 | ✅ | StructureBlueprintFiles.write 返回候选名、BlueprintClientFiles.receive 校验并回显 |
| resolved #4963/#4964/#4966、fixed #4968、resolved #4970 | 未校验 | 无 gh 凭据,无法查询 issue 状态与关闭链 |
结论: COMMENT(建议处理
🧪 测试建议
| 被测目标 | 推荐测试场景 | 优先级 |
|---|---|---|
BuildingRodUndo.SavedEntity.matches() |
放置含生物/掉落物的蓝图 → 等 1 tick → 撤销;验证方块是否应还原、材料是否应返还 | 🔴 |
StructureSaveUtil.buildSnapshot(BlueprintCapture 分支) |
扫描区内含磁铁节点但支撑方块被破坏 → SAVE 各入口(GUI 保存 / 自动保存 / action 包)逐一验证不抛异常 | 🔴 |
BlueprintPlacement.tile × commit 上限 |
含门/床/活塞头的多方块蓝图拖拽平铺 → 统计实际放置格数与材料扣减是否一致 | 🟡 |
BlueprintTicks.capture/restore |
含红石计划刻/流体计划刻的结构导出再投影,验证 tick 时刻与 priority 保持 | 🟡 |
BuildingMaterials.reserveCreature |
背包树脂块 + 刷怪蛋混放、无蛋生物(仅树脂)、蛋跨两栈拆分 → 计量与撤销返还 | 🟡 |
BlueprintEntities.link |
生物乘骑载具(含嵌套乘客)蓝图投影,验证乘骑关系与记忆引用指向新 UUID | 🟡 |
标题
建议标题(本次 gh 未认证,未能自动修改):
Support tiled blueprint projection, block/entity runtime restoration and material requirements 支持蓝图平铺重复投影、方块/实体运行状态恢复与材料需求补全
由 Hermes Agent 审查
|
💾 Self-improvement review: Patched references/blueprint-repetition-and-runtime-entity-restore-review.md in skill 'building-rod-blueprint-review' (1 replacement). · Patched SKILL.md in skill 'building-rod-blueprint-review' (1 replacement). |
|
💾 Self-improvement review: Patched SKILL.md in skill 'building-rod-blueprint-review' (1 replacement). · Patched SKILL.md in skill 'mixin-injection-verification' (1 replacement). |
|
已完成审查。以下是审查意见(gh token 已失效,未能自动改标题,建议标题附在末尾)。 代码审查摘要 — PR #4971操作: opened(synchronize 后 head 🔴 关键
|
| 声称 | 状态 | 对应文件 |
|---|---|---|
| 拖拽平铺投影 / 松开锁定 / 再右键批量粘贴 | ✅ | BlueprintPlacement.tile, BuildingRodClient(blueprintOffset/press/release/confirm/PLACE_BLUEPRINTS), BuildingRodPacket |
| 统一预览与放置范围限制 | ✅( |
BlueprintPlacement.tile ← 客户端/服务端共用, BuildingRodRenderer |
| 选区距离锁定 / 方向调整 / 尺寸显示 | ✅ | BuildingRodClient.selectionBounds, applyControl(4 方向), handleKeyboardInput, selection_size |
| 统一结构扫描快照采集 | ✅( |
StructureSaveUtil.buildSnapshot → BlueprintCapture |
| 保存/恢复运行进度、计划刻、时间基准 | ✅( |
BlueprintRuntimeData, BlueprintTicks, StructureSnapshot(+Codec), BlueprintBlockConfiguration |
| Litematica 计划刻导入 | Time 语义待确认) |
LitematicaImporter |
| 建造后红石/流体/邻居更新,避免误触侦测器 | ✅ | BuildingCommit.activate/activatePlaced/isRestoredObserverUpdate, BlueprintLevelMixin |
| 生物/掉落物/投射物/移动方块/模组实体建造 | ✅(🔴 第 1 条信任边界) | DynamicBuildingEntities, BlueprintEntities, MagnetizedNodeBuildAdapter, EntityBuildAdapters, BuildingEntityTransform |
| 恢复运动状态/乘骑/实体引用 | ✅ | BuildingEntityTransform(Motion 旋转/SlidingBlocks/Relative*), BlueprintEntities.link |
| 树脂封存生物供料,补全装备/库存/流体/特殊方块材料 | ✅ | BuildingMaterials.reserveCreature, DynamicBuildingEntities(contents), VanillaBuildingEntities.VehicleAdapter(fluids), BlueprintSpecialBlocks |
| 磁铁/铁砧锤/点火工具需求校验 + 显示不支持对象 | ✅ | EntityBuildAdapter.requiredTool/requiresHammer, BuildingMaterials.reserveTool/reserveHammer/reserveIgnitions, unsupported_type |
| 实体纳入撤销(仅状态未变且可修改的组) | ✅( |
BuildingRodUndo |
| 导出同名自动编号 + 反馈实际文件名 | ✅ | StructureBlueprintFiles.write, BlueprintClientFiles.receive |
结论: REQUEST_CHANGES(建议先处理 🔴 第 1、2 条,
🧪 测试建议
| 被测目标 | 推荐场景 | 优先级 |
|---|---|---|
BlueprintPlacement.tile() |
offset 恰好 = / 略小于 / 为 0 / 为负;count*entries 刚好越界;MAX_BLOCKS 边界 |
🔴 |
BuildingRodService.blueprints() + planBlueprint() |
平铺多份时的 declared/portalCores 归属;第二份失败时不得留下半成品 |
🔴 |
BlueprintTicks.read/restore |
缺 pos/未知 type/>32768 条 → 期望可捕获的 IAE 而非 NSEE;capturedAt=0 回退分支;RESTORE 时 placed 过滤 |
🔴 |
BuildingEntityTransform.sanitize() |
恶意 NBT(1e9 Attributes/ActiveEffects/Invulnerable)不得生效;Passengers/UUID 必须被剥离 | 🔴 |
BuildingRodUndo |
实体 NBT 自然漂移(Age/Motion)后撤销行为;节点/出口实体与方块同组时的跳过语义 | 🟡 |
BuildingMaterials 工具/生物/点火预留 |
铁砧锤被 retainedTool 占用后不能当材料消耗;树脂封存生物匹配;火焰计数(多扇传送门/多处火) |
🟡 |
BuildingCommit.activate() |
侦测器朝向不被邻居更新改写、且恢复后仍能被真实邻居触发;计划刻/流体刻数量与蓝图一致 | 🟡 |
StructureSaveUtil.buildSnapshot() / ScannerDiskNormalizer |
扫描区域被改动后导出内容;magnetized_node 支撑缺失时不得整体失败 |
🟡 |
StructureBlueprintFiles.write() |
目录内已存在 a.nbt、a_1.nbt、…;名称长度接近 128 的截断 |
🟢 |
建议标题(gh auth status 显示 token 已失效,故未自动修改):
Support blueprint tiling, runtime-tick restoration and entity building 支持蓝图平铺投影、运行状态/计划刻恢复与实体建造
由 Hermes Agent 审查
|
💾 Self-improvement review: Patched SKILL.md in skill 'building-rod-blueprint-review' (1 replacement). · Patched references/shell-only-diff-navigation.md in skill 'github-webhook-pr-review' (1 replacement). · Patched references/pr-class-routing.md in skill 'github-webhook-pr-review' (1 replacement). |
Uh oh!
There was an error while loading. Please reload this page.