Skip to content

Commit

Permalink
Fix casting Channels not respecting fluid-parameter when draining. #1517
Browse files Browse the repository at this point in the history


You still shouldn't use them though.
  • Loading branch information
bonii-xx committed Apr 19, 2015
1 parent 5cf22cb commit 958f350
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/tconstruct/smeltery/logic/CastingChannelLogic.java
Expand Up @@ -383,6 +383,17 @@ else if (from == ForgeDirection.NORTH || from == ForgeDirection.SOUTH || from ==
@Override
public FluidStack drain (ForgeDirection from, FluidStack resource, boolean doDrain)
{
FluidStack fluidStack = null;
if (from == ForgeDirection.DOWN)
if(this.internalTank.getFluid() != null)
fluidStack = this.internalTank.getFluid();
else if(validOutputs.contains(from))
fluidStack = this.subTanks.get(from).getFluid();

// wrong fluid
if(fluidStack != null && fluidStack.getFluid() != resource.getFluid())
return null;

return drain(from, resource.amount, doDrain);
}

Expand Down

0 comments on commit 958f350

Please sign in to comment.