From fb87773c3ab77522a27651dcf20066277bb5e88d Mon Sep 17 00:00:00 2001 From: LexManos Date: Mon, 28 Jan 2013 17:33:53 -0800 Subject: [PATCH] Added input getters for Ore recipies, and javadoc warning for modders, #390 --- common/net/minecraftforge/oredict/ShapedOreRecipe.java | 10 ++++++++++ .../net/minecraftforge/oredict/ShapelessOreRecipe.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/common/net/minecraftforge/oredict/ShapedOreRecipe.java b/common/net/minecraftforge/oredict/ShapedOreRecipe.java index c3409309f..cdf86574f 100644 --- a/common/net/minecraftforge/oredict/ShapedOreRecipe.java +++ b/common/net/minecraftforge/oredict/ShapedOreRecipe.java @@ -251,4 +251,14 @@ public class ShapedOreRecipe implements IRecipe mirrored = mirror; return this; } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public Object[] getInput() + { + return this.input; + } } diff --git a/common/net/minecraftforge/oredict/ShapelessOreRecipe.java b/common/net/minecraftforge/oredict/ShapelessOreRecipe.java index db3e605f0..18e3d8912 100644 --- a/common/net/minecraftforge/oredict/ShapelessOreRecipe.java +++ b/common/net/minecraftforge/oredict/ShapelessOreRecipe.java @@ -139,4 +139,14 @@ public class ShapelessOreRecipe implements IRecipe { return (target.itemID == input.itemID && (target.getItemDamage() == -1 || target.getItemDamage() == input.getItemDamage())); } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public ArrayList getInput() + { + return this.input; + } }