Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Fix crib separation for industrial multi machine #849

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;

import javax.annotation.Nonnull;
Expand All @@ -34,7 +33,6 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.google.common.collect.Lists;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
Expand All @@ -56,6 +54,7 @@
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME;
import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME;
import gregtech.common.tileentities.machines.IDualInputHatch;
import gregtech.common.tileentities.machines.IDualInputInventory;
Expand Down Expand Up @@ -435,6 +434,9 @@ protected CheckRecipeResult doCheckRecipe() {
processingLogic.setInputFluids(getStoredFluids());
// Default logic
for (GT_MetaTileEntity_Hatch_InputBus bus : mInputBusses) {
if (bus instanceof GT_MetaTileEntity_Hatch_CraftingInput_ME) {
continue;
}
List<ItemStack> inputItems = new ArrayList<>();
for (int i = bus.getSizeInventory() - 1; i >= 0; i--) {
ItemStack stored = bus.getStackInSlot(i);
Expand Down Expand Up @@ -462,17 +464,6 @@ protected CheckRecipeResult doCheckRecipe() {

@Override
public ArrayList<FluidStack> getStoredFluids() {
if (supportsCraftingMEBuffer()) {
for (IDualInputHatch tHatch : mDualInputHatches) {
if (tHatch.supportsFluids()) {
Optional<IDualInputInventory> inventory = tHatch.getFirstNonEmptyInventory();
if (inventory.isPresent()) {
return Lists.newArrayList(inventory.get().getFluidInputs());
}
}
}
}

ArrayList<FluidStack> rList = new ArrayList<>();
for (GT_MetaTileEntity_Hatch_Input tHatch : filterValidMTEs(mInputHatches)) {
if (tHatch instanceof GT_MetaTileEntity_Hatch_Solidifier) {
Expand Down