From 71c84fc6b14dd144c34bc296516297e68f6c1382 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 16 Jan 2013 19:49:54 -0500 Subject: [PATCH] Part two of proper fix for issue #563 Implement ILiquidTank getTank properly --- common/buildcraft/factory/TileRefinery.java | 48 +++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 7ad66bef..d1992409 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -449,9 +449,51 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR @Override public ILiquidTank getTank(ForgeDirection direction, LiquidStack type) { - // TODO Auto-generated method stub - return null; - } + ForgeDirection dir = ForgeDirection.values()[worldObj.getBlockMetadata(xCoord, yCoord, zCoord)]; + + switch (direction) { + case NORTH: + switch (dir) { + case WEST: + return ingredient2; + case EAST: + return ingredient1; + default: + return null; + } + case SOUTH: + switch (dir) { + case WEST: + return ingredient1; + case EAST: + return ingredient2; + default: + return null; + } + case EAST: + switch (dir) { + case NORTH: + return ingredient2; + case SOUTH: + return ingredient1; + default: + return null; + } + case WEST: + switch (dir) { + case NORTH: + return ingredient1; + case SOUTH: + return ingredient2; + default: + return null; + } + case DOWN: + return result; + default: + return null; + } +} // Network