Fixed bug - drain cover don't work when installed on pipe. (#1428)

This commit is contained in:
Dimach 2018-04-12 00:28:58 +03:00 committed by Blood-Asp
parent ddd82e57e9
commit 7e2d9076b2

View file

@ -43,8 +43,8 @@ public class GT_Cover_Drain
tLiquid = ((IFluidBlock) tBlock).drain(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), false);
}
if ((tLiquid != null) && (tLiquid.getFluid() != null) && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0)) || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0))) &&
(((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) == tLiquid.amount)) {
((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, true);
(((IFluidHandler) aTileEntity).fill(ForgeDirection.UNKNOWN, tLiquid, false) == tLiquid.amount)) {
((IFluidHandler) aTileEntity).fill(ForgeDirection.UNKNOWN, tLiquid, true);
aTileEntity.getWorld().setBlockToAir(aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ);
}
}