Interface ShapedCraftingRecipe.Builder

All Superinterfaces:
AbstractBuilder<ShapedCraftingRecipe>, Builder<ShapedCraftingRecipe, ShapedCraftingRecipe.Builder>, ResettableBuilder<ShapedCraftingRecipe, ShapedCraftingRecipe.Builder>
All Known Subinterfaces:
ShapedCraftingRecipe.Builder.AisleStep, ShapedCraftingRecipe.Builder.AisleStep.ResultStep, ShapedCraftingRecipe.Builder.EndStep, ShapedCraftingRecipe.Builder.ResultStep, ShapedCraftingRecipe.Builder.RowsStep, ShapedCraftingRecipe.Builder.RowsStep.ResultStep
Enclosing interface:
ShapedCraftingRecipe

public static interface ShapedCraftingRecipe.Builder extends Builder<ShapedCraftingRecipe, ShapedCraftingRecipe.Builder>
The Builder for ShapedCraftingRecipes.

The shaped recipe pattern can be built one of two ways:

Either by defining the pattern with aisle(String...) and then setting ShapedCraftingRecipe.Builder.AisleStep.where(char, Ingredient) the ingredients are.

Or by defining the pattern using rows() adding each ShapedCraftingRecipe.Builder.RowsStep.row(Ingredient...) of ingredients after the other.


    Ingredient log = Ingredient.of(LOG);
    ShapedCraftingRecipe.builder()
        .aisle("sss")
        .where('s', log)
        .result(ItemStack.of(WOODEN_PRESSURE_PLATE, 1))
        .key(RessourceKey.of(plugin, "my_pressure_plate))
        .build();

    ShapedCraftingRecipe.builder()
        .rows()
        .row(log, log, log)
        .result(ItemStack.of(WOODEN_PRESSURE_PLATE, 1))
        .key(RessourceKey.of(plugin, "my_pressure_plate))
        .build();