Class RecipeHelper.Shapeless

java.lang.Object
net.ixdarklord.coolcatcore.api.utils.RecipeHelper.Shapeless
Enclosing class:
RecipeHelper

public static class RecipeHelper.Shapeless extends Object
Helper class to perform a shapeless recipe match when ingredients that require testing are involved.

The problem to solve is a maximum cardinality bipartite matching, for which this implementation uses the augmenting path algorithm. This has good performance in simple cases, and sufficient O(N^3) asymptotic complexity in the worst case.

  • Method Details

    • isMatch

      public static <T extends net.minecraft.world.item.ItemStack> boolean isMatch(List<T> inputs, List<? extends Predicate<T>> tests)