public ShapedRecipe shape(final String... shape){
  Validate.notNull(shape,"Must provide a shape");
  Validate.isTrue(shape.length > 0 && shape.length < 4,"Crafting recipes should be 1, 2, 3 rows, not ",shape.length);
  for (  String row : shape) {
    Validate.notNull(row,"Shape cannot have null rows");
    Validate.isTrue(row.length() > 0 && row.length() < 4,"Crafting rows should be 1, 2, or 3 characters, not ",row.length());
  }
  this.rows=new String[shape.length];
  for (int i=0; i < shape.length; i++) {
    this.rows[i]=shape[i];
  }
  HashMap<Character,ItemStack> newIngredients=new HashMap<Character,ItemStack>();
  for (  String row : shape) {
    for (    Character c : row.toCharArray()) {
      newIngredients.put(c,ingredients.get(c));
    }
  }
  this.ingredients=newIngredients;
  return this;
}

public ShapedRecipe shape ( final String ... shape ) { Validate . notNull ( shape , "Must provide a shape" ) ; Validate . isTrue ( shape . length > 0 && shape . length < 4 , "Crafting recipes should be 1, 2, 3 rows, not " , shape . length ) ; for ( String row : shape ) { Validate . notNull ( row , "Shape cannot have null rows" ) ; Validate . isTrue ( row . length ( ) > 0 && row . length ( ) < 4 , "Crafting rows should be 1, 2, or 3 characters, not " , row . length ( ) ) ; } this . rows = new String [ shape . length ] ; for ( int i = 0 ; i < shape . length ; i ++ ) { this . rows [ i ] = shape [ i ] ; } HashMap < Character , ItemStack > newIngredients = new HashMap < Character , ItemStack > ( ) ; for ( String row : shape ) { for ( Character c : row . toCharArray ( ) ) { newIngredients . put ( c , ingredients . get ( c ) ) ; } } this . ingredients = newIngredients ; return this ; }
set the shape of this recipe to the specified rows . each character represents a different ingredient ; exactly what each character represents is set separately . the first row supplied corresponds with the upper most part of the recipe on the workbench e . g . if all three rows are supplies the first string represents the top row on the workbench .
