Class GroupRecipe

  • All Implemented Interfaces:
    io.github.sakaki_aruka.customcrafter.recipe.CRecipe , io.github.sakaki_aruka.customcrafter.recipe.UnPartialSearchableRecipe

    
    public class GroupRecipe
     implements CRecipe, UnPartialSearchableRecipe
                        

    Implementation of CRecipe.

    This recipe only provides CRecipe.Type.SHAPED.

    This recipe has groups what is a list of air-containable matter (GroupRecipe.Matter).

    This recipe has the constraint that "all Context#members to which the key that returns the smallest CoordinateComponent#toIndex value in items belongs cannot have an element in candidate that satisfies Material#isAir."

    items = {
        (0, 0): [Material.AIR, Material.STONE],
        (0, 1): [Material.COBBLESTONE]
    }
    
    // This is invalid groups. Group1 contains the minimum coordinate what keyed with a CMatter that contains Material.AIR.
    groups = [Group1{ (0, 0) }, Group2{ (0, 1) }]
    // Other invalid pattern
    items = {
        (0, 0): [Material.STONE],
        (0, 1): [Material.AIR, Material.COBBLESTONE]
    }
    
    // This is invalid group.
    groups = [Group1{ (0, 0), (0, 1) }]

    GroupRecipe.recipePredicate is always appended to GroupRecipe.predicates automatically, regardless of whether predicates is specified in the constructor.

    Since:

    5.0.15