Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,17 +552,9 @@ public boolean hasCustomName()
@Override
public int[] getSlotsForFace(EnumFacing side)
{
if (side == EnumFacing.DOWN)
{
return new int[] {0, 1, 2, 3};
}

if (side == EnumFacing.UP)
{
return new int[] {0};
}

return new int[] {1, 2, 3};


return side == EnumFacing.UP ? new int[] { 0 } : new int[] { 0, 1, 2 };
}

@Override
Expand Down Expand Up @@ -596,7 +588,7 @@ public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side)
case 1:
return FluidUtil.isEmptyContainer(itemstack);
case 2:
case 3:

return FluidUtil.isFullContainer(itemstack);

default:
Expand All @@ -613,7 +605,7 @@ public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
return ItemElectricBase.isElectricItem(itemstack.getItem());
case 1:
case 2:
case 3:

return FluidUtil.isValidContainer(itemstack);
}

Expand Down Expand Up @@ -642,8 +634,8 @@ public EnumFacing getElectricInputDirection()
public boolean canDrain(EnumFacing from, Fluid fluid)
{

// 2->5 3->4 4->2 5->3
if (getElectricInputDirection().getOpposite() == from)

if (from == getGasInputDirection().getOpposite())
{
return this.liquidTank.getFluid() != null && this.liquidTank.getFluidAmount() > 0;
}
Expand All @@ -655,8 +647,8 @@ public boolean canDrain(EnumFacing from, Fluid fluid)
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
{

// 2->5 3->4 4->2 5->3
if (getElectricInputDirection().getOpposite() == from)

if (from == getGasInputDirection().getOpposite())
{
if (resource != null && resource.isFluidEqual(this.liquidTank.getFluid()))
{
Expand All @@ -671,8 +663,8 @@ public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
{

// 2->5 3->4 4->2 5->3
if (getElectricInputDirection().getOpposite() == from)

if (from == getGasInputDirection().getOpposite())
{
return this.liquidTank.drain(maxDrain, doDrain);
}
Expand Down Expand Up @@ -720,7 +712,7 @@ public FluidTankInfo[] getTankInfo(EnumFacing from)
tankInfo = new FluidTankInfo[] {new FluidTankInfo(this.gasTank)};
}

if (getElectricInputDirection().getOpposite() == from)
if (getGasInputDirection().getOpposite() == from)
{
tankInfo = new FluidTankInfo[] {new FluidTankInfo(this.liquidTank)};
}
Expand Down Expand Up @@ -901,4 +893,4 @@ public EnumFacing getFront()
{
return this.byIndex();
}
}
}