From 89b686513756e38b20105749dd2aff1de7bd1372 Mon Sep 17 00:00:00 2001 From: Mary <33456283+FourIsTheNumber@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:54:42 -0400 Subject: Fix stocking bus on black hole (#3217) Co-authored-by: Martin Robertz --- .../multi/compressor/MTEBlackHoleCompressor.java | 63 +++++++++++++--------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java index 39538bfc7f..ba1c38db40 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java @@ -434,6 +434,44 @@ public class MTEBlackHoleCompressor extends MTEExtendedPowerMultiBlockBase findRecipeMatches(@Nullable RecipeMap map) { - // Loop through all items and look for the Activation and Deactivation Catalysts - // Deactivation resets stability to 100 and catalyzing cost to 1 - for (MTEHatchInputBus bus : mInputBusses) { - for (ItemStack inputItem : bus.mInventory) { - if (inputItem != null) { - if (inputItem.getItem() instanceof MetaGeneratedItem01) { - if (inputItem.getItemDamage() == 32418 && (blackHoleStatus == 1)) { - inputItem.stackSize -= 1; - blackHoleStatus = 2; - createRenderBlock(); - break; - } else if (inputItem.getItemDamage() == 32419 && !(blackHoleStatus == 1)) { - inputItem.stackSize -= 1; - blackHoleStatus = 1; - blackHoleStability = 100; - catalyzingCostModifier = 1; - rendererTileEntity = null; - destroyRenderBlock(); - break; - } - } - } - } - } + searchAndDecrementCatalysts(); RecipeMap realMap = (getModeFromCircuit(inputItems) == MACHINEMODE_COMPRESSOR) ? RecipeMaps.compressorRecipes -- cgit