Prime patching material

- Fixed open pipe ends not providing fluids to pipe networks
- Safety check for pipe attachment rendering
This commit is contained in:
simibubi 2020-12-19 00:52:41 +01:00
parent 62621f8bdd
commit 5b3e1e8c38
2 changed files with 8 additions and 2 deletions

View File

@ -191,6 +191,12 @@ public class FluidNetwork {
transfer = handler.drain(toExtract, action);
}
if (transfer.isEmpty()) {
FluidStack genericExtract = handler.drain(flowSpeed, action);
if (!genericExtract.isEmpty() && genericExtract.isFluidEqual(fluid))
transfer = genericExtract;
}
if (transfer.isEmpty())
return;

View File

@ -32,10 +32,10 @@ public class StraightPipeTileEntity extends SmartTileEntity {
public StraightPipeFluidTransportBehaviour(SmartTileEntity te) {
super(te);
}
@Override
public boolean canHaveFlowToward(BlockState state, Direction direction) {
return state.get(AxisPipeBlock.AXIS) == direction.getAxis();
return state.has(AxisPipeBlock.AXIS) && state.get(AxisPipeBlock.AXIS) == direction.getAxis();
}
@Override