@@ -53,6 +53,12 @@ public MachineRecipeCategoryBuilder fluids(Consumer<SlotPositions.Builder> input
5353 return this ;
5454 }
5555
56+ MachineRecipeCategoryBuilder withSteamFluidInputSlot ()
57+ {
58+ this .fluidInputPositions = combine (new SlotPositions .Builder ().addSlot (12 , 35 ).build (), fluidInputPositions ).build ();
59+ return this ;
60+ }
61+
5662 public MachineRecipeCategoryBuilder progressBar (int renderX , int renderY , String progressBarType , boolean isVertical )
5763 {
5864 progressBar = new ProgressBar .Parameters (renderX , renderY , progressBarType , isVertical );
@@ -71,7 +77,7 @@ public MachineRecipeCategoryBuilder predicate(MachineRecipePredicate predicate)
7177 return this ;
7278 }
7379
74- private static SlotPositions combine (SlotPositions a , SlotPositions b )
80+ private static SlotPositions . Builder combine (SlotPositions a , SlotPositions b )
7581 {
7682 var combined = new SlotPositions .Builder ();
7783 for (int i = 0 ; i < a .size (); i ++)
@@ -82,17 +88,17 @@ private static SlotPositions combine(SlotPositions a, SlotPositions b)
8288 {
8389 combined .addSlot (b .getX (i ), b .getY (i ));
8490 }
85- return combined . build () ;
91+ return combined ;
8692 }
8793
8894 private SlotPositions itemPositions ()
8995 {
90- return combine (itemInputPositions , itemOutputPositions );
96+ return combine (itemInputPositions , itemOutputPositions ). build () ;
9197 }
9298
9399 private SlotPositions fluidPositions ()
94100 {
95- return combine (fluidInputPositions , fluidOutputPositions );
101+ return combine (fluidInputPositions , fluidOutputPositions ). build () ;
96102 }
97103
98104 boolean hasInputs ()
@@ -119,7 +125,7 @@ MachineInventoryComponent buildInventory(int steamBuckets, int bucketCapacity)
119125 {
120126 return MachineInventoryHelper .buildInventoryComponent (
121127 itemInputPositions .size (), itemOutputPositions .size (),
122- fluidInputPositions .size (), fluidOutputPositions .size (),
128+ Math . max ( 0 , fluidInputPositions .size () - ( steamBuckets > 0 ? 1 : 0 ) ), fluidOutputPositions .size (),
123129 this .itemPositions (), this .fluidPositions (),
124130 steamBuckets , bucketCapacity
125131 );
@@ -163,4 +169,16 @@ void build(MIHook hook,
163169 isMultiblock , steamMode
164170 );
165171 }
172+
173+ MachineRecipeCategoryBuilder copy ()
174+ {
175+ var copy = new MachineRecipeCategoryBuilder (isMultiblock , steamMode , recipeType );
176+ copy .itemInputPositions = itemInputPositions ;
177+ copy .itemOutputPositions = itemOutputPositions ;
178+ copy .fluidInputPositions = fluidInputPositions ;
179+ copy .fluidOutputPositions = fluidOutputPositions ;
180+ copy .progressBar = progressBar ;
181+ copy .predicate = predicate ;
182+ return copy ;
183+ }
166184}
0 commit comments