diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
| commit | 05c78126859231a68e199dc34613689bd0978e2f (patch) | |
| tree | 050bea104a18c72905095d29f31bec2935a27a24 /ihl/recipes/RecipeInputObjectInstance.java | |
Initial commit
Diffstat (limited to 'ihl/recipes/RecipeInputObjectInstance.java')
| -rw-r--r-- | ihl/recipes/RecipeInputObjectInstance.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/ihl/recipes/RecipeInputObjectInstance.java b/ihl/recipes/RecipeInputObjectInstance.java new file mode 100644 index 0000000..eeadc5c --- /dev/null +++ b/ihl/recipes/RecipeInputObjectInstance.java @@ -0,0 +1,46 @@ +package ihl.recipes; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.item.ItemStack; +import ic2.api.recipe.IRecipeInput; +import ihl.interfaces.IWire; +import ihl.items_blocks.FlexibleCableItem; +import ihl.utils.IHLUtils; + +public class RecipeInputObjectInstance implements IRecipeInput +{ + public final ItemStack input; + + public RecipeInputObjectInstance(ItemStack aInput) + { + this.input = aInput; + } + + @Override + public boolean matches(ItemStack subject) + { + return this.input==subject; + } + + @Override + public int getAmount() + { + return IHLUtils.getAmountOf(input); + } + + @Override + public List<ItemStack> getInputs() + { + return Arrays.asList(new ItemStack[] {this.input}); + } + + @Override + public String toString() + { + ItemStack stack = this.input.copy(); + return "RInputWireItemStack<" + stack + ">"; + } + +} |
