DUP: 奥术/坩埚 List 输入在 setMaxSize(1) 前未 copy,可能改活堆叠 #3

Closed
opened 2026-11-15 15:58:50 +00:00 by layue13 · 1 comment
Owner

调研编号:

现象

ShapedArcaneRecipeHandler / AlchemyRecipeHandler 对 List 或 ItemStack[] 输入以 genPerms=false 建 PositionedStack 后 setMaxSize(1)。NEI 在 genPerms=false 时不 expandPermutations/copy,setMaxSize 写原对象。

危害类与优先级

  • 危害类:DUP → 标签 type/defect
  • 优先级:p3(专用服多半只改客户端表副本;缺 stackSize>1 的 List/数组输入实例)

证据(生效源码)

  • 载体:TDLM/AspectRecipeIndex + 分支 origin/master + pin/commit 315f8c7e746d209655f1e6a2f0a97790d424dfea(submodule upstream)
  • 位置:src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java:132-139
  • 关键原文:
PositionedStack stack = new PositionedStack(object, XPOS[x], YPOS[y], object instanceof ItemStack);
stack.setMaxSize(1);
ingredients.add(stack);
  • applied 树路径:补丁层;该处无覆盖补丁,生效=upstream@315f8c7e746d209655f1e6a2f0a97790d424dfea
  • 上游状态:未修

触发与复现

  • 触发条件:打开奥术有序或坩埚配方,某格输入为 List/ItemStack[] 且元素 stackSize>1。
  • 静态推演:D4 别名形状;条件 3 在专用服未证。
  • 未验证(仅形状相同——此时本 issue 是候选)
  • 包内相关性:模块 AspectRecipeIndex/sides client,server/默认配置可达:未证

落点

  • 主仓:TDLM/AspectRecipeIndex → ShapedArcaneRecipeHandler.java:132;AlchemyRecipeHandler.java:101

范式

引证

  1. 不可点开:源在 submodule upstream@315f8c7e746d209655f1e6a2f0a97790d424dfea;mirror 可点开 — 315f8c7e74/src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java (L132-L139)

来源

  • 线索类型:内部代码审查(无外部报障)
  • 可解析指针:upstream@315f8c7e746d / src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java:132-139
  • 来源标签:origin/scan
**调研编号**: ## 现象 ShapedArcaneRecipeHandler / AlchemyRecipeHandler 对 List 或 ItemStack[] 输入以 genPerms=false 建 PositionedStack 后 setMaxSize(1)。NEI 在 genPerms=false 时不 expandPermutations/copy,setMaxSize 写原对象。 ## 危害类与优先级 - 危害类:`DUP` → 标签 `type/defect` - 优先级:`p3`(专用服多半只改客户端表副本;缺 stackSize>1 的 List/数组输入实例) ## 证据(生效源码) - 载体:`TDLM/AspectRecipeIndex` + 分支 `origin/master` + pin/commit `315f8c7e746d209655f1e6a2f0a97790d424dfea`(submodule upstream) - 位置:`src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java:132-139` - 关键原文: ```java PositionedStack stack = new PositionedStack(object, XPOS[x], YPOS[y], object instanceof ItemStack); stack.setMaxSize(1); ingredients.add(stack); ``` - applied 树路径:补丁层;该处无覆盖补丁,生效=upstream@315f8c7e746d209655f1e6a2f0a97790d424dfea - 上游状态:未修 ## 触发与复现 - 触发条件:打开奥术有序或坩埚配方,某格输入为 List/ItemStack[] 且元素 stackSize>1。 - 静态推演:D4 别名形状;条件 3 在专用服未证。 - 未验证(仅形状相同——此时本 issue 是候选) - 包内相关性:模块 `AspectRecipeIndex`/sides `client,server`/默认配置可达:未证 ## 落点 - 主仓:`TDLM/AspectRecipeIndex` → `ShapedArcaneRecipeHandler.java:132;AlchemyRecipeHandler.java:101` ## 范式 - 命中范式:[D4 别名与缺失拷贝](https://git.potatolab.uk/TDLM/mc-defect-patterns/src/commit/5c71fe760eaf11509476cc892da1e76ad0912b46/dup/D4-%E5%88%AB%E5%90%8D%E4%B8%8E%E7%BC%BA%E5%A4%B1%E6%8B%B7%E8%B4%9D.md) - 扫描档 needs_human。 ## 引证 1. 不可点开:源在 submodule upstream@315f8c7e746d209655f1e6a2f0a97790d424dfea;mirror 可点开 — https://git.nest.potatolab.uk:8443/upstream/AspectRecipeIndex/src/commit/315f8c7e746d209655f1e6a2f0a97790d424dfea/src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java#L132-L139 ## 来源 - 线索类型:内部代码审查(无外部报障) - 可解析指针:upstream@315f8c7e746d / src/main/java/com/gtnewhorizons/aspectrecipeindex/nei/ShapedArcaneRecipeHandler.java:132-139 - 来源标签:origin/scan
layue13 added the
priority
p3
area/clientorigin/scan
type
defect
labels 2026-11-15 15:58:51 +00:00
layue13 added the
resolution
fixed
label 2026-11-15 16:27:24 +00:00
Author
Owner

已修:TemplateThaumHandler.setMaxSizeOnCopies,奥术/坩埚/无序奥术在 setMaxSize 前拷贝 items[]。layer commit 1f348a0。

已修:TemplateThaumHandler.setMaxSizeOnCopies,奥术/坩埚/无序奥术在 setMaxSize 前拷贝 items[]。layer commit 1f348a0。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TDLM/AspectRecipeIndex#3