Fix problems with fluid external storage
This commit is contained in:
@@ -50,7 +50,9 @@ public class FluidStorageCache implements IStorageCache<FluidStack> {
|
||||
}
|
||||
|
||||
for (FluidStack stack : storage.getStacks()) {
|
||||
add(stack, stack.getAmount(), true, false);
|
||||
if (!stack.isEmpty()) {
|
||||
add(stack, stack.getAmount(), true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class FluidExternalStorageCache {
|
||||
if (actual.isEmpty() && !cached.isEmpty()) { // REMOVED
|
||||
network.getFluidStorageCache().remove(cached, cached.getAmount(), true);
|
||||
|
||||
cache.set(i, null);
|
||||
cache.set(i, FluidStack.EMPTY);
|
||||
} else if (!actual.isEmpty() && cached.isEmpty()) { // ADDED
|
||||
network.getFluidStorageCache().add(actual, actual.getAmount(), false, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user