@@ -1095,23 +1095,6 @@ public static void collapseFluidList(@NotNull List<FluidStack> stacks,
10951095 @ Range (from = 1 , to = Integer .MAX_VALUE ) int maxStackSize ,
10961096 boolean removeEmpty ) {
10971097 stacks .removeIf (Objects ::isNull );
1098- // TODO: replace with FluidStackHashStrategy once the MUI2 Multi PR merges
1099- Hash .Strategy <FluidStack > stackStrategy = new Hash .Strategy <>() {
1100-
1101- @ Override
1102- public int hashCode (FluidStack o ) {
1103- // don't need to do this since I'll only call equals
1104- return 0 ;
1105- }
1106-
1107- @ Override
1108- public boolean equals (FluidStack a , FluidStack b ) {
1109- if (a == null ) return b == null ;
1110- if (b == null ) return false ;
1111-
1112- return a .getFluid () == b .getFluid () && Objects .equals (a .tag , b .tag );
1113- }
1114- };
11151098
11161099 for (int checkingSlot = 0 ; checkingSlot < stacks .size (); checkingSlot ++) {
11171100 FluidStack stackToCheck = stacks .get (checkingSlot );
@@ -1121,7 +1104,7 @@ public boolean equals(FluidStack a, FluidStack b) {
11211104 FluidStack collapsingStack = stacks .get (collapsingSlot );
11221105 if (collapsingStack .amount < 1 ) continue ;
11231106
1124- if (stackStrategy .equals (stackToCheck , collapsingStack )) {
1107+ if (FluidStackHashStrategy . comparingAllButAmount () .equals (stackToCheck , collapsingStack )) {
11251108 final int checkingSize = stackToCheck .amount ;
11261109 final int collapsingSize = collapsingStack .amount ;
11271110
0 commit comments