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