From 15ee39c84e42ca5cd2e1deb951ecd3db41539acb Mon Sep 17 00:00:00 2001 From: layue13 Date: Mon, 16 Nov 2026 00:26:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=89=E5=BA=8F=E8=BD=A7=E6=9C=BA=20N?= =?UTF-8?q?EI=20=E5=9C=A8=20setMaxSize=20=E5=89=8D=E6=8B=B7=E8=B4=9D?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=A0=86=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4 Co-authored-by: Cursor --- ...rolling-machine-inputs-before-setMax.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 patches/0001-fix-copy-shaped-rolling-machine-inputs-before-setMax.patch diff --git a/patches/0001-fix-copy-shaped-rolling-machine-inputs-before-setMax.patch b/patches/0001-fix-copy-shaped-rolling-machine-inputs-before-setMax.patch new file mode 100644 index 0000000..12df93f --- /dev/null +++ b/patches/0001-fix-copy-shaped-rolling-machine-inputs-before-setMax.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Stratum +Date: Mon, 16 Nov 2026 00:23:38 +0800 +Subject: [PATCH] fix: copy shaped rolling-machine inputs before setMaxSize + +PositionedStack with genPerms=false aliases items[] to the live recipe +stacks. setMaxSize(1) was shrinking those originals; copy them first. + +Co-authored-by: Cursor +--- + .../mods/railcraft/RecipeHandlerRollingMachineShaped.java | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/main/java/tonius/neiintegration/mods/railcraft/RecipeHandlerRollingMachineShaped.java b/src/main/java/tonius/neiintegration/mods/railcraft/RecipeHandlerRollingMachineShaped.java +index c2a4896..baf078a 100644 +--- a/src/main/java/tonius/neiintegration/mods/railcraft/RecipeHandlerRollingMachineShaped.java ++++ b/src/main/java/tonius/neiintegration/mods/railcraft/RecipeHandlerRollingMachineShaped.java +@@ -60,7 +60,14 @@ public class RecipeHandlerRollingMachineShaped extends RecipeHandlerRollingMachi + continue; + } + ++ // genPerms=false leaves items[] aliased to the live recipe stacks. + PositionedStack stack = new PositionedStack(item, 25 + x * 18, 8 + y * 18, false); ++ ItemStack[] aliased = stack.items; ++ ItemStack[] copies = new ItemStack[aliased.length]; ++ for (int i = 0; i < aliased.length; i++) { ++ copies[i] = aliased[i] == null ? null : aliased[i].copy(); ++ } ++ stack.items = copies; + stack.setMaxSize(1); + this.inputs.add(stack); + }