diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-02-12 20:43:03 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-02-12 20:43:03 +0300 |
| commit | 5cb4c6e24033cf337812390d99a6817d24d21eab (patch) | |
| tree | 695789855920199efd4702a7bb3e4bacfe58b9f0 /ihl/collector/InvSlotMultiCharge.java | |
| parent | 8f22398517206aed21a7fd840f463332429fae35 (diff) | |
Removed explosion radius limitations. Explosion calculation optimized (reduced memory usage). One more detonator and explosive pack recipe. GT6 recipes for both chemical reactors and cryogenic distiller. Max stack size of muffle furnace is limited to 32. A lot of old features are removed.
Diffstat (limited to 'ihl/collector/InvSlotMultiCharge.java')
| -rw-r--r-- | ihl/collector/InvSlotMultiCharge.java | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/ihl/collector/InvSlotMultiCharge.java b/ihl/collector/InvSlotMultiCharge.java deleted file mode 100644 index 5c1219f..0000000 --- a/ihl/collector/InvSlotMultiCharge.java +++ /dev/null @@ -1,96 +0,0 @@ -package ihl.collector;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-import ic2.core.block.TileEntityInventory;
-import ic2.core.block.invslot.InvSlot;
-
-public class InvSlotMultiCharge extends InvSlot {
- public int tier;
-
- public InvSlotMultiCharge(TileEntityInventory base1, int oldStartIndex1, int tier1, int count)
- {
- super(base1, "charge", oldStartIndex1, InvSlot.Access.IO, count, InvSlot.InvSide.TOP);
- this.tier = tier1;
- }
-
- @Override
- public boolean accepts(ItemStack itemStack)
- {
- Item item = itemStack.getItem();
- return item instanceof IElectricItem ? ((IElectricItem)item).getTier(itemStack) <= this.tier : false;
- }
-
- public IElectricItem getItem(int slotNum)
- {
- ItemStack itemStack = this.get(slotNum);
- return itemStack == null ? null : (IElectricItem)itemStack.getItem();
- }
-
- public double charge(int amount, int slotNum)
- {
- ItemStack itemStack = this.get(slotNum);
-
- if (itemStack == null)
- {
- return 0;
- }
- else
- {
- Item item = itemStack.getItem();
- return item instanceof IElectricItem ? ElectricItem.manager.charge(itemStack, amount, this.tier, false, false) : 0;
- }
- }
-
- public void setTier(int tier1)
- {
- this.tier = tier1;
- }
-
- public boolean addItemStackToFirstEmptyStack(ItemStack stack)
- {
- int slotNum = this.getFirstEmptyStack();
- if(slotNum<0 || slotNum>=this.size())
- {
- return false;
- }
- else
- {
- if(this.accepts(stack))
- {
- this.put(slotNum, stack);
- return true;
- }
- else
- {
- return false;
- }
- }
- }
-
- @Override
- public void put(ItemStack stack)
- {
- this.addItemStackToFirstEmptyStack(stack);
- }
-
- public int getFirstEmptyStack()
- {
- for(int i=0;i<this.size();i++)
- {
- if(this.get(i)==null)
- {
- return i;
- }
- }
- return -1;
- }
-
- @Override
- public boolean isEmpty()
- {
- return this.getFirstEmptyStack()>=0;
- }
-}
|
