diff options
| author | Harry <harryyunull@gmail.com> | 2023-07-26 09:17:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-26 15:17:14 +0200 |
| commit | 093bfa0dc02bc330b1ed79704832152917c3d6f8 (patch) | |
| tree | a53004e54ae3b026a8bdaa00b006189ab25e5426 /src/main/java/gregtech/common/tileentities/machines/multi | |
| parent | 005fd2fbf72950f019cc2a20c37bb97c2c68b428 (diff) | |
| download | GT5-Unofficial-093bfa0dc02bc330b1ed79704832152917c3d6f8.tar.gz GT5-Unofficial-093bfa0dc02bc330b1ed79704832152917c3d6f8.tar.bz2 GT5-Unofficial-093bfa0dc02bc330b1ed79704832152917c3d6f8.zip | |
Texture & Bug fixes for Crafting Input Hatches (#2182)
* crafting input textures
* texture v2
* texture v3
* texture
* various fixes
* lazy pattern update
* fix dtpf
* fix removing pattern
* spotless
* fix lag in recipe checks
* fix
* increase tier so they look pretty
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
| -rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java index d1a2a9dd7f..7beb6e65b6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java @@ -21,6 +21,7 @@ import static java.lang.Math.log; import static java.lang.Math.pow; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import net.minecraft.item.ItemStack; @@ -59,6 +60,8 @@ import gregtech.api.util.GT_ExoticEnergyInputHelper; 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.IDualInputHatch; +import gregtech.common.tileentities.machines.IDualInputInventory; public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_PlasmaForge> implements ISurvivalConstructable { @@ -668,11 +671,21 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @NotNull public CheckRecipeResult checkProcessing() { CheckRecipeResult recipe_process = processRecipe(getCompactedInputs(), getCompactedFluids()); + if (recipe_process.wasSuccessful()) return recipe_process; + + // If not successful, then try crafting input buffers + for (IDualInputHatch hatch : mDualInputHatches) { + for (Iterator<? extends IDualInputInventory> it = hatch.inventories(); it.hasNext();) { + IDualInputInventory inventory = it.next(); + recipe_process = processRecipe(inventory.getItemInputs(), inventory.getFluidInputs()); + if (recipe_process.wasSuccessful()) { + return recipe_process; + } + } + } // If recipe cannot be found then continuity is broken and reset running time to 0. - if (!recipe_process.wasSuccessful()) { - resetDiscount(); - } + resetDiscount(); return recipe_process; } |
