Added Errors for shape recipes with more then 3 columns.

This commit is contained in:
AlgorithmX2 2014-02-26 21:56:33 -06:00
parent 076ddd548f
commit 7f908441ee
2 changed files with 11 additions and 6 deletions

2
api

@ -1 +1 @@
Subproject commit 0ea16a10fc3038230f09e42de0c08a24da2d8096
Subproject commit 8c7e3f1c77f3175da5e82bcdf9187e5dc5b6e0b0

View file

@ -31,12 +31,17 @@ public class Shaped implements ICraftHandler
if ( rows > 0 && input.size() <= 3 )
{
cols = input.get( 0 ).size();
for (int x = 0; x < input.size(); x++)
if ( input.get( x ).size() != cols )
throw new RecipeError( "all rows in a shaped crafting recipe must contain the same number of ingredients." );
if ( cols <= 3 && cols >= 1 )
{
for (int x = 0; x < input.size(); x++)
if ( input.get( x ).size() != cols )
throw new RecipeError( "all rows in a shaped crafting recipe must contain the same number of ingredients." );
inputs = input;
this.output = output.get( 0 ).get( 0 );
inputs = input;
this.output = output.get( 0 ).get( 0 );
}
else
throw new RecipeError( "Crafting recipes must have 1-3 columns." );
}
else
throw new RecipeError( "shaped crafting recpies must have 1-3 rows." );