Fixed fluid autocrafting scheduling too much crafting tasks for buckets, fixes #351 and #352

This commit is contained in:
Raoul Van den Berge
2016-09-17 12:19:26 +02:00
parent aaad4e0d6e
commit c91f683f37
2 changed files with 3 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
- Solderer now accepts items from any side, allowing easier automation (raoulvdberge)
- Solderer is now intelligent about items in slots, and will only accept an item if it is part of a recipe (raoulvdberge)
- Changed recipe for upgrades in the Solderer, they now just take 1 of the unique item instead of 2, using redstone instead (raoulvdberge)
- Fixed fluid autocrafting scheduling too much crafting tasks for buckets (raoulvdberge)
- Fixed blocks in hand facing wrong direction (raoulvdberge)
- Updated to Forge 2088 (raoulvdberge)

View File

@@ -7,9 +7,9 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import refinedstorage.api.autocrafting.ICraftingPattern;
import refinedstorage.api.network.INetworkMaster;
import refinedstorage.api.network.NetworkUtils;
import refinedstorage.api.storage.CompareUtils;
public final class FluidUtils {
public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.BUCKET);
@@ -51,11 +51,7 @@ public final class FluidUtils {
if (result != null) {
result.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null).fill(NetworkUtils.extractFluid(network, fluidStack, Fluid.BUCKET_VOLUME), true);
} else {
ICraftingPattern pattern = NetworkUtils.getPattern(network, EMPTY_BUCKET);
if (pattern != null) {
network.addCraftingTask(NetworkUtils.createCraftingTask(network, pattern));
}
NetworkUtils.scheduleCraftingTaskIfUnscheduled(network, EMPTY_BUCKET, 1, CompareUtils.COMPARE_DAMAGE | CompareUtils.COMPARE_NBT);
}
}
}