Skip to content

Commit e9964dc

Browse files
committed
Fix cases where buckets get prematurely moved to output slots
1 parent c7d7752 commit e9964dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/mekanism/common/inventory/slot/IFluidHandlerSlot.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ default void drainTank(IInventorySlot outputSlot) {
128128
//Fill the stack, note our stack is a copy so this is how we simulate to get the proper "container" item,
129129
// and it does not actually matter that we are directly executing on the item
130130
int toDrain = fluidHandlerItem.fill(fluidInTank, FluidAction.EXECUTE);
131+
if (toDrain == 0) {
132+
//If we cannot actually fill the item then just exit early
133+
return;
134+
}
131135
if (getCount() == 1) {
132136
IFluidHandlerItem containerCap = Capabilities.FLUID.getCapability(fluidHandlerItem.getContainer());
133137
if (containerCap != null && containerCap.fill(fluidInTank, FluidAction.SIMULATE) > 0) {

0 commit comments

Comments
 (0)