Skip to content

Commit

Permalink
Removed old, commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSengir committed May 19, 2013
1 parent a5bb01d commit 46c0d7d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 101 deletions.
27 changes: 0 additions & 27 deletions common/buildcraft/transport/pipes/PipeItemsEmerald.java
Expand Up @@ -132,33 +132,6 @@ public ItemStack[] checkExtract(IInventory inventory, boolean doRemove, ForgeDir

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() {
Expand Down
74 changes: 0 additions & 74 deletions common/buildcraft/transport/pipes/PipeItemsWood.java
Expand Up @@ -157,80 +157,6 @@ public ItemStack[] checkExtract(IInventory inventory, boolean doRemove, ForgeDir

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) {
Expand Down

0 comments on commit 46c0d7d

Please sign in to comment.