Removed filter code so that the CME would not occur until fixed.
This commit is contained in:
parent
1a908d64c6
commit
f1301f65d4
|
@ -1,15 +1,7 @@
|
|||
package WayofTime.bloodmagic.item.routing;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.item.inventory.ItemInventory;
|
||||
import WayofTime.bloodmagic.routing.IItemFilter;
|
||||
import WayofTime.bloodmagic.routing.TestItemFilter;
|
||||
import WayofTime.bloodmagic.util.GhostItemHelper;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
@ -18,6 +10,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.routing.IItemFilter;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class ItemRouterFilter extends Item implements IItemFilterProvider
|
||||
{
|
||||
|
@ -58,55 +54,57 @@ public class ItemRouterFilter extends Item implements IItemFilterProvider
|
|||
@Override
|
||||
public IItemFilter getInputItemFilter(ItemStack filterStack, IInventory inventory, EnumFacing syphonDirection)
|
||||
{
|
||||
IItemFilter testFilter = new TestItemFilter();
|
||||
List<ItemStack> filteredList = new LinkedList<ItemStack>();
|
||||
ItemInventory inv = new ItemInventory(filterStack, 9, "");
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if (stack == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack);
|
||||
if (ghostStack.stackSize == 0)
|
||||
{
|
||||
ghostStack.stackSize = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
filteredList.add(ghostStack);
|
||||
}
|
||||
|
||||
testFilter.initializeFilter(filteredList, inventory, syphonDirection, false);
|
||||
return testFilter;
|
||||
// IItemFilter testFilter = new TestItemFilter();
|
||||
// List<ItemStack> filteredList = new LinkedList<ItemStack>();
|
||||
// ItemInventory inv = new ItemInventory(filterStack, 9, "");
|
||||
// for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
// {
|
||||
// ItemStack stack = inv.getStackInSlot(i);
|
||||
// if (stack == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack);
|
||||
// if (ghostStack.stackSize == 0)
|
||||
// {
|
||||
// ghostStack.stackSize = Integer.MAX_VALUE;
|
||||
// }
|
||||
//
|
||||
// filteredList.add(ghostStack);
|
||||
// }
|
||||
//
|
||||
// testFilter.initializeFilter(filteredList, inventory, syphonDirection, false);
|
||||
// return testFilter;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemFilter getOutputItemFilter(ItemStack filterStack, IInventory inventory, EnumFacing syphonDirection)
|
||||
{
|
||||
IItemFilter testFilter = new TestItemFilter();
|
||||
List<ItemStack> filteredList = new LinkedList<ItemStack>();
|
||||
ItemInventory inv = new ItemInventory(filterStack, 9, ""); //TODO: Change to grab the filter from the Item later.
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if (stack == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack);
|
||||
if (ghostStack.stackSize == 0)
|
||||
{
|
||||
ghostStack.stackSize = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
filteredList.add(ghostStack);
|
||||
}
|
||||
|
||||
testFilter.initializeFilter(filteredList, inventory, syphonDirection, true);
|
||||
return testFilter;
|
||||
// IItemFilter testFilter = new TestItemFilter();
|
||||
// List<ItemStack> filteredList = new LinkedList<ItemStack>();
|
||||
// ItemInventory inv = new ItemInventory(filterStack, 9, ""); //TODO: Change to grab the filter from the Item later.
|
||||
// for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
// {
|
||||
// ItemStack stack = inv.getStackInSlot(i);
|
||||
// if (stack == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// ItemStack ghostStack = GhostItemHelper.getStackFromGhost(stack);
|
||||
// if (ghostStack.stackSize == 0)
|
||||
// {
|
||||
// ghostStack.stackSize = Integer.MAX_VALUE;
|
||||
// }
|
||||
//
|
||||
// filteredList.add(ghostStack);
|
||||
// }
|
||||
//
|
||||
// testFilter.initializeFilter(filteredList, inventory, syphonDirection, true);
|
||||
// return testFilter;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue