From 46c0d7deaaf0bb0db2241487c131eab8ee5b6a33 Mon Sep 17 00:00:00 2001 From: SirSengir Date: Sun, 19 May 2013 23:33:54 +0200 Subject: [PATCH] Removed old, commented out code. --- .../transport/pipes/PipeItemsEmerald.java | 27 ------- .../transport/pipes/PipeItemsWood.java | 74 ------------------- 2 files changed, 101 deletions(-) diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 8125065f..21d5199d 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -132,33 +132,6 @@ public class PipeItemsEmerald extends PipeItemsWood implements ISpecialInventory return null; - - /* - if (inventory instanceof ISidedInventory) { - ISidedInventory sidedInv = (ISidedInventory) inventory; - - int first = sidedInv.getStartInventorySide(from); - int last = first + sidedInv.getSizeInventorySide(from) - 1; - - IInventory inv = Utils.getInventory(inventory); - - ItemStack result = checkExtractGeneric(inv, doRemove, from, first, last); - - if (result != null) { - return new ItemStack[]{result}; - } - } else { - // This is a generic inventory - IInventory inv = Utils.getInventory(inventory); - - ItemStack result = checkExtractGeneric(inv, doRemove, from, 0, inv.getSizeInventory() - 1); - - if (result != null) { - return new ItemStack[]{result}; - } - } - - return null; */ } private void incrementFilter() { diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 5b1676a6..04e735b3 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -157,80 +157,6 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor { return null; - /* - if (inventory instanceof ISidedInventory) { - net.minecraft.inventory.ISidedInventory sidedInv = (ISidedInventory) inventory; - - int[] slots = sidedInv.getAccessibleSlotsFromSide(from.ordinal()); - - ItemStack result = checkExtractGeneric(sidedInv, doRemove, from, slots); - - if (result != null) - return new ItemStack[] { result }; - - } else if (inventory instanceof net.minecraftforge.common.ISidedInventory) { - net.minecraftforge.common.ISidedInventory sidedInv = (net.minecraftforge.common.ISidedInventory) inventory; - - int first = sidedInv.getStartInventorySide(from); - int last = first + sidedInv.getSizeInventorySide(from) - 1; - - IInventory inv = Utils.getInventory(inventory); - - ItemStack result = checkExtractGeneric(sidedInv, doRemove, from, first, last); - - if (result != null) - return new ItemStack[] { result }; - - } else if (inventory.getSizeInventory() == 2) { - // This is an input-output inventory - - int slotIndex = 0; - - if (from == ForgeDirection.DOWN || from == ForgeDirection.UP) { - slotIndex = 0; - } else { - slotIndex = 1; - } - - ItemStack slot = inventory.getStackInSlot(slotIndex); - - if (slot != null && slot.stackSize > 0) { - if (doRemove) - return new ItemStack[] { inventory.decrStackSize(slotIndex, (int) powerProvider.useEnergy(1, slot.stackSize, true)) }; - else - return new ItemStack[] { slot }; - } - } else if (inventory.getSizeInventory() == 3) { - // This is a furnace-like inventory - - int slotIndex = 0; - - if (from == ForgeDirection.UP) { - slotIndex = 0; - } else if (from == ForgeDirection.DOWN) { - slotIndex = 1; - } else { - slotIndex = 2; - } - - ItemStack slot = inventory.getStackInSlot(slotIndex); - - if (slot != null && slot.stackSize > 0) { - if (doRemove) - return new ItemStack[] { inventory.decrStackSize(slotIndex, (int) powerProvider.useEnergy(1, slot.stackSize, true)) }; - else - return new ItemStack[] { slot }; - } - } else { - // This is a generic inventory - IInventory inv = Utils.getInventory(inventory); - - ItemStack result = checkExtractGeneric(inv, doRemove, from, 0, inv.getSizeInventory() - 1); - - if (result != null) - return new ItemStack[] { result }; - } - */ } public ItemStack checkExtractGeneric(IInventory inventory, boolean doRemove, ForgeDirection from) {