Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class TankValvePartMachine extends MultiblockPartMachine {
public TankValvePartMachine(BlockEntityCreationInfo info, boolean isMetal) {
super(info);

tankProxy = attachTrait(new FluidTankProxyTrait(IO.BOTH));
tankProxy = attachTrait(new FluidTankProxyTrait(getIO()));
autoIOSubscription = new ConditionalSubscriptionHandler(this, this::autoIO, this::shouldAutoIO);
}

Expand Down Expand Up @@ -104,4 +104,8 @@ private boolean shouldAutoIO() {
if (tankProxy.isEmpty()) return false;
return getTargetTank() != null;
}

private IO getIO() {
return shouldAutoIO() ? IO.OUT : IO.BOTH;
}
}
Loading