Interface ShapedCraftingRecipe.Builder

All Superinterfaces:
AbstractBuilder<RecipeRegistration>, Builder<RecipeRegistration,ShapedCraftingRecipe.Builder>, ResettableBuilder<RecipeRegistration,ShapedCraftingRecipe.Builder>, ResourceKeyedBuilder<RecipeRegistration,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 ResourceKeyedBuilder<RecipeRegistration,ShapedCraftingRecipe.Builder>
The Builder for ShapedCraftingRecipes.

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

Either by defining the pattern with aisle(java.lang.String...) and then setting ShapedCraftingRecipe.Builder.AisleStep.where(char, org.spongepowered.api.item.recipe.crafting.Ingredient) the ingredients are.

Or by defining the pattern using rows() adding each ShapedCraftingRecipe.Builder.RowsStep.row(org.spongepowered.api.item.recipe.crafting.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();