From 1657ae25ad96ccb4114050208f14e8362d0a07b4 Mon Sep 17 00:00:00 2001 From: Tobias Wohlfarth Date: Tue, 29 Sep 2015 21:50:26 +0200 Subject: [PATCH] fix: Forestry Carpenter - made the Input liquid really optional --- .../mods/forestry/handlers/Carpenter.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/main/java/modtweaker2/mods/forestry/handlers/Carpenter.java b/src/main/java/modtweaker2/mods/forestry/handlers/Carpenter.java index a45c77b..7e822fc 100644 --- a/src/main/java/modtweaker2/mods/forestry/handlers/Carpenter.java +++ b/src/main/java/modtweaker2/mods/forestry/handlers/Carpenter.java @@ -36,18 +36,31 @@ public class Carpenter { public static final String name = "Forestry Carpenter"; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - + + /** + * Adds a shaped recipe for the Carpenter + * + * @param output recipe output + * @param ingredients recipe ingredients + * @param packagingTime time per crafting operation + * @optionalParam box recipes casting item (optional) + */ + @ZenMethod + public static void addRecipe(IItemStack output, IIngredient[][] ingredients, int packagingTime, @Optional IItemStack box) { + MineTweakerAPI.apply(new Add(new Recipe(packagingTime, null, toStack(box), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)) ))); + } + /** * Adds a shaped recipe for the Carpenter * * @param output recipe output * @param ingredients recipe ingredients - * @optionalParam fluidInput recipe fluid amount + * @param fluidInput recipe fluid amount * @param packagingTime time per crafting operation * @optionalParam box recipes casting item (optional) */ @ZenMethod - public static void addRecipe(IItemStack output, IIngredient[][] ingredients, @Optional ILiquidStack fluidInput, int packagingTime, @Optional IItemStack box) { + public static void addRecipe(IItemStack output, IIngredient[][] ingredients, ILiquidStack fluidInput, int packagingTime, @Optional IItemStack box) { MineTweakerAPI.apply(new Add(new Recipe(packagingTime, toFluid(fluidInput), toStack(box), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)) ))); } @@ -67,11 +80,6 @@ public class Carpenter { MineTweakerAPI.apply(new Add(new Recipe(packagingTime, toFluid(liquid), toStack(ingredient), new ShapedRecipeCustom(3, 3, toStacks(ingredients), toStack(product))))); } - public ShapedRecipeCustom convertToRecipeCustom() { - - return null; - } - private static class Add extends BaseListAddition { public Add(Recipe recipe) {