Merge pull request #274 from aaron-powell/master

Fixed bukkit version of recipes.js module
This commit is contained in:
Walter Higgins 2015-12-30 16:26:32 +00:00
commit 7090ac5c5b

View file

@ -3,9 +3,9 @@ var bkShapedRecipe = org.bukkit.inventory.ShapedRecipe;
exports.add = function( recipe ){
var result = new bkShapedRecipe( recipe.result );
result.shape( recipe.shape );
result.shape(recipe.shape[0], recipe.shape[1], recipe.shape[2]);
for (var i in recipe.ingredients ){
result.setIngredient( i, recipe.ingredients[i] );
result.setIngredient( new java.lang.Character(i), recipe.ingredients[i].getData() );
}
server.addRecipe(result);
return result;