Fixed autocrafting + external FLUID storage dupe. Fixes #2037

This commit is contained in:
raoulvdberge
2018-10-17 21:30:10 +02:00
parent aec99b378d
commit ec89e43e35
2 changed files with 1 additions and 15 deletions

View File

@@ -11,7 +11,7 @@
- Fixed fluid autocrafting without item inputs locking when there's not enough space for the fluids (raoulvdberge)
- Fixed Grid "last changed" date not changing when using clear button or JEI transfer (raoulvdberge)
- Fixed a duplication bug when pressing clear on a Wireless Crafting Grid (raoulvdberge)
- Fixed duplication bug with autocrafting and External Storages (raoulvdberge)
- Fixed a duplication bug with autocrafting and External Storages (raoulvdberge)
- Fixed Crafting Manager displaying wrong name for chained crafters connected to some blocks (raoulvdberge)
- Fixed crafting task losing internal buffer when network runs out of energy (raoulvdberge)
- Removed handling of reusable items in autocrafting, to avoid problems (raoulvdberge)

View File

@@ -78,25 +78,11 @@ public class StorageExternalFluid implements IStorageExternal<FluidStack> {
network.getFluidStorageCache().remove(cached, cached.amount, true);
} else if (actual != null && cached == null) {
network.getFluidStorageCache().add(actual, actual.amount, false, true);
// When we use an interface + crafting upgrade + external storage combo, we don't want the crafting task
// to think we inserted twice.
if (!isConnectedToInterface()) {
network.getCraftingManager().track(actual, actual.amount);
}
} else if (!API.instance().getComparer().isEqual(actual, cached, IComparer.COMPARE_NBT)) {
network.getFluidStorageCache().remove(cached, cached.amount, true);
network.getFluidStorageCache().add(actual, actual.amount, false, true);
if (!isConnectedToInterface()) {
network.getCraftingManager().track(actual, actual.amount);
}
} else if (actual.amount > cached.amount) {
network.getFluidStorageCache().add(actual, actual.amount - cached.amount, false, true);
if (!isConnectedToInterface()) {
network.getCraftingManager().track(actual, actual.amount - cached.amount);
}
} else if (actual.amount < cached.amount) {
network.getFluidStorageCache().remove(actual, cached.amount - actual.amount, true);
}