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); + }