Removed makeShapedRecipe and makeShapelessRecipe.

This commit is contained in:
walterhiggins 2014-11-09 11:48:40 +00:00
parent 2eeb3be1cb
commit 7ce32d4557
3 changed files with 6 additions and 12 deletions

View file

@ -74,14 +74,6 @@ public class ScriptCraftPlugin extends Plugin implements PluginListener, Command
} }
}; };
} }
public CraftingRecipe makeShapedRecipe(Item resultingItem, RecipeRow... rows){
CraftingRecipe result = new CraftingRecipe(resultingItem, rows);
return result;
}
public CraftingRecipe makeShapelessRecipe(Item resultingItem, Item... items){
CraftingRecipe result = new CraftingRecipe(resultingItem, items);
return result;
}
static class ScriptCraftTask extends ServerTask { static class ScriptCraftTask extends ServerTask {
private Runnable runnable = null; private Runnable runnable = null;
public ScriptCraftTask(Runnable runnable, TaskOwner owner, long delay, boolean continuous){ public ScriptCraftTask(Runnable runnable, TaskOwner owner, long delay, boolean continuous){

View file

@ -26,9 +26,9 @@ function createRecipe( recipe ){
} }
rows.push( new cmRecipeRow(recipe.shape[i], rr) ); rows.push( new cmRecipeRow(recipe.shape[i], rr) );
} }
result = __plugin.makeShapedRecipe( recipe.result, rows); result = cmRecipe.createShapedRecipe( recipe.result, rows);
} else { } else {
result = __plugin.makeShapelessRecipe( recipe.result, recipe.ingredients ); result = cmRecipe.createShapelessRecipe( recipe.result, recipe.ingredients );
} }
return result; return result;
} }

View file

@ -10,7 +10,7 @@ To add an EnderBow to the game (assumes there's an enchanted Item variable calle
var recipes = require('recipes'); var recipes = require('recipes');
var items = require('items'); var items = require('items');
... ...
var enderBowRecipe = recipes.add( { var enderBowRecipe = recipes.create( {
result: enderBow, result: enderBow,
ingredients: { ingredients: {
E: items.enderPearl(1), E: items.enderPearl(1),
@ -21,8 +21,10 @@ To add an EnderBow to the game (assumes there's an enchanted Item variable calle
'SEW', 'SEW',
'ESW' ] 'ESW' ]
} ); } );
// add to server
var addedRecipe = server.addRecipe( enderBowRecipe );
// to remove... // to remove...
recipes.remove( enderBowRecipe ); server.removeRemove( addedRecipe );
***/ ***/
if (__plugin.canary) { if (__plugin.canary) {