summaryrefslogtreecommitdiff
path: root/ihl/flexible_cable/InvSlotOutputInProgress.java
diff options
context:
space:
mode:
authorFoghrye4 <foghrye4@gmail.com>2017-06-17 08:12:18 +0300
committerFoghrye4 <foghrye4@gmail.com>2017-06-17 08:12:18 +0300
commitdc3df3edd5843bde0c1335d6a8e460b2c832aa48 (patch)
treeaf13bfeee567f2351e35e1ef176d168fe37c8aac /ihl/flexible_cable/InvSlotOutputInProgress.java
parent1da8dcd58647e34c9af94ceeecaeaf3b0d08c48c (diff)
full project files
Diffstat (limited to 'ihl/flexible_cable/InvSlotOutputInProgress.java')
-rw-r--r--ihl/flexible_cable/InvSlotOutputInProgress.java93
1 files changed, 0 insertions, 93 deletions
diff --git a/ihl/flexible_cable/InvSlotOutputInProgress.java b/ihl/flexible_cable/InvSlotOutputInProgress.java
deleted file mode 100644
index da17e0f..0000000
--- a/ihl/flexible_cable/InvSlotOutputInProgress.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package ihl.flexible_cable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class InvSlotOutputInProgress extends IronWorkbenchInvSlot{
- public short[] slotRecipe;
- private int size;
- public InvSlotOutputInProgress(IronWorkbenchTileEntity base1, String name1, int oldStartIndex1, int count) {
- super(base1, name1, oldStartIndex1, Access.NONE, count);
- slotRecipe = new short[count];
- size=count;
- for(int i=0;i<slotRecipe.length;i++)
- {
- slotRecipe[i]=-1;
- }
- }
-
- @Override
- public boolean accepts(ItemStack itemStack)
- {
- return false;
- }
-
- @Override
- public boolean getCanTakeStack()
- {
- return false;
- }
-
- @Override
- public void writeToNbt(NBTTagCompound nbtTagCompound){}
-
- @Override
- public void readFromNbt(NBTTagCompound nbtTagCompound){}
-
- public short put(List<ItemStack> outputs)
- {
- short slot=this.getFirstEmptySlot();
- if(slot!=-1 && outputs!=null && !outputs.isEmpty() && slot<=this.size()-outputs.size())
- {
- for(int i=0;i<outputs.size();i++)
- {
- ItemStack output = outputs.get(i);
- this.put(slot+i,output.copy());
- this.slotRecipe[slot+i]=slot;
- }
- }
- return slot;
- }
-
-
-
- private short getFirstEmptySlot()
- {
- for(short i=0; i<this.size();i++)
- {
- if(this.get(i)==null)
- {
- return i;
- }
- }
- return -1;
- }
-
- public int getCheckSum()
- {
- int sum=0;
- for(short i=0; i<this.size();i++)
- {
- sum+=this.slotRecipe[i];
- }
- return sum;
- }
-
- public List<ItemStack> getRecipeOutputs(int currentSlot)
- {
- int slotRecipeIndex=this.slotRecipe[currentSlot];
- List<ItemStack> list = new ArrayList<ItemStack>();
- for(int i=0;i<this.size;i++)
- {
- if(this.slotRecipe[i]==slotRecipeIndex && get(i)!=null)
- {
- list.add(get(i));
- }
- }
- return list;
- }
-
-}