Repository navigation
Plan recipe batches within container capacity 添加受容器容量约束的配方批次规划 - #246
Merged
PigeonNian merged 1 commit intoNov 8, 2026
Merged
Conversation
- 基于库存快照选择能容纳全部产物的最长连续批次,支持满槽压缩 - 保留未加工原料及可复用催化剂,阻止本轮产物再次参与输入 - 预计算随机与组件函数结果,在库存提交成功后执行选中批次副作用 - 补充鱼缸接入、槽位限制和外部资源校验的接口文档
PigeonNian
approved these changes
Nov 8, 2026
Gugle2308
reviewed
Nov 8, 2026
Gugle2308
left a comment
There was a problem hiding this comment.
结论:PR #246 已关闭并合并,按规范不发布任何审查评论
未发表评论。 依据全局规范第 1 条:当 PR 的操作或状态为 closed 或 labeled 时,应立即停止,不发布任何评论。
实测状态
| 项 | 值 |
|---|---|
state |
closed |
merged |
true |
closed_at / merged_at |
2026-11-08T04:52:04Z |
| base | dev/26.3 @ ba1e3ac3 |
| head | 446244a5(codex/fix-5961-batches-26.3) |
| 规模 | 5 文件 +446/−11(比其他线多 7 行,因为 SpawnItem(Holder<Item>, …) 构造器按 26.3 换行风格重排,且 count 类型为 ContextIntProvider) |
| 已有 review | 1 条 APPROVED |
全族 7 条线已全部合并
| PR | 目标分支 | 状态 |
|---|---|---|
| #240 | dev/1.21.1 |
✅ merged |
| #241 | dev/26.1 |
✅ merged |
| #242 | dev/1.21.11 |
✅ merged |
| #243 | dev/1.21.4 |
✅ merged |
| #244 | dev/1.21.8 |
✅ merged |
| #245 | dev/26.2 |
✅ merged |
| #246 | dev/26.3 |
✅ merged(本轮) |
ItemBatchPlan.java(344 行算法本体)、IPlannedItemOutcome、PlannedItem 七线逐字节相同;仅 SpawnItem.java 与 README 既有示例因线别 API 不同(ItemStack↔ItemStackTemplate、ResourceLocation↔Identifier、ContextIntProvider、Blocks.CUT_COPPER_STAIRS.waxed()、EntityTypes.COW)。
合并时仍未修复的遗留项(7 条线同源,均成立于当前主干)
由于 7 条线内容同源,我在 #240–#242、#245 审查中提出的问题在所有线合并时都未修复:
ChooseOneOutcome未实现IPlannedItemOutcome(ChooseOneOutcome.java:26,Choice(IRecipeOutcome<?>, …)可持有SpawnItem,:84直接acceptWithChance)——choose_one产物的配方无法参与容量规划,但执行时仍产出 → #5961 描述的产物溢出对这类配方依旧复现;AnvilCraftItemCrushRecipeLoader.java:94正在使用该模式。这是唯一影响功能目标的一条。- 344 行回溯搜索 + 公开 API 零单元测试(
module.recipe/src/test仍不存在)。 fillEmpty无搜索预算上限,且plan每轮批次从头重跑fit。resolved #5961跨仓引用不生效;库侧 API 合入 ≠ AnvilCraft 侧 issue 已修复。commit()的batches == 0早退不调用库存回调、effect 抛异常会中断后续 effect,均未在 README 说明。
ChooseOneOutcome 规划缺口)的跟进 issue 文本吗?
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.
feat(recipe): 添加受容器容量约束的批次规划