Skip to content

Commit

Permalink
🍳 Update SiphonBlockEntity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Penta0308 committed Oct 24, 2024
1 parent 4fa96a4 commit 478c067
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public FluidStack drain(int maxDrain, FluidAction action) {
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
FluidStack toDrain = resource.copy();
if (toDrain.isEmpty()) return FluidStack.EMPTY;
toDrain.setAmount(Math.min(resource.getAmount(), leftToDrain));
FluidStack drained = super.drain(toDrain, action);
if (action.execute()) leftToDrain -= drained.getAmount();
Expand Down

0 comments on commit 478c067

Please sign in to comment.