Skip to content
Open
Show file tree
Hide file tree
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 @@ -255,6 +255,8 @@ public int fill(FluidStack resource, FluidAction action) {
if (action.simulate())
return fill;

containedFluidStack = getFluid();
hasBlockState = FluidHelper.hasBlockState(containedFluidStack.getFluid());
if (effectHandler != null && !resource.isEmpty()) {
// resource should be copied before giving it to the handler.
// if hasBlockState is false, it was already copied above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public int fill(FluidStack resource, FluidAction action) {
}

if (action.simulate())
return diff <= 0 ? resource.getAmount() : internalTank.fill(remaining, action);
return diff <= 0 ? resource.getAmount() : internalTank.fill(resource, action);
if (diff <= 0) {
internalTank.drain(-diff, FluidAction.EXECUTE);
return resource.getAmount();
Expand Down
Loading