Fixed bug in filter behavior. (#1425)
This commit is contained in:
parent
7e2d9076b2
commit
860cc0daf0
2 changed files with 37 additions and 37 deletions
|
@ -1181,11 +1181,11 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
return false;
|
||||
|
||||
if(isFill && mMetaTileEntity.isLiquidInput((byte) aSide.ordinal())
|
||||
&& getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), mMetaTileEntity.getFluid() == null ? null : mMetaTileEntity.getFluid().getFluid(), this))
|
||||
&& getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this))
|
||||
return true;
|
||||
|
||||
if (!isFill && mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal())
|
||||
&& getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), mMetaTileEntity.getFluid() == null ? null : mMetaTileEntity.getFluid().getFluid(), this))
|
||||
&& getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -64,13 +64,13 @@ public class GT_Cover_Fluidfilter
|
|||
if(aFluid==null){return true;}
|
||||
int aFilterMode = aCoverVariable & 7;
|
||||
int aFilterFluid = aCoverVariable >>> 3;
|
||||
return aFluid.getID() == aFilterFluid ? (aFilterMode == 0 || aFilterMode == 2 ? true : false) : (aFilterMode == 1 || aFilterMode == 3 ? true : false);
|
||||
return aFluid.getID() == aFilterFluid ? aFilterMode == 0 || aFilterMode == 2 : aFilterMode == 1 || aFilterMode == 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
|
||||
int aFilterMode = aCoverVariable & 7;
|
||||
return aFilterMode == 0 || aFilterMode == 1 ? false : true;
|
||||
return aFilterMode != 0 && aFilterMode != 1;
|
||||
}
|
||||
|
||||
public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
||||
|
|
Loading…
Reference in a new issue