mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
make drain function w/ fluid argument work
This commit is contained in:
1 parent
2342d4a5e2
commit
b13e2b5340
1 file changed
+9
-6
@@ -54,16 +54,19 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
|
||||
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
|
||||
return smeltery.drain(maxDrain, doDrain);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain (ForgeDirection from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
if (hasValidMaster() && canDrain(from, null))
|
||||
{
|
||||
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
|
||||
if(resource.getFluid() == smeltery.getFluid()){
|
||||
return smeltery.drain(resource.amount, doDrain);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -193,4 +196,4 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
|
||||
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(master.x, master.y, master.z);
|
||||
return 15 * smeltery.currentLiquid / smeltery.maxLiquid;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user