From 5c07f729139fff33afd43f2cdfc2ae7a1eb050e0 Mon Sep 17 00:00:00 2001 From: Volence <32358820+Volence@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:49:37 -0400 Subject: Fix Algae Farm Compatability casings above UHV (#2791) * fix machine casing capability * require 1 input hatch and output bus, and make input hatch need to match casing tier * update tooltip * remove excess variable * update recipe generation count so it's not done on the fly --- .../algae/GregtechMTE_AlgaePondBase.java | 32 +++++++++++++++++----- .../loaders/recipe/RecipeLoader_AlgaeFarm.java | 4 +-- 2 files changed, 27 insertions(+), 9 deletions(-) (limited to 'src/main') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index fd0c4885e1..bec0812232 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -21,6 +21,7 @@ import net.minecraftforge.fluids.FluidStack; import org.jetbrains.annotations.NotNull; +import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -34,6 +35,7 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; @@ -62,7 +64,6 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase STRUCTURE_DEFINITION = null; private int checkMeta; - private int minTierOfHatch; private static final Class cofhWater; static { @@ -96,7 +97,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase ++x.mCasing, + addTieredBlock( + TT_Container_Casings.sBlockCasingsNH, + GregtechMTE_AlgaePondBase::setMeta, + GregtechMTE_AlgaePondBase::getMeta, + 10, + 15)))) .addElement('X', ofBlock(ModBlocks.blockCasings2Misc, 15)) .build(); } @@ -169,10 +178,18 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase= 64 && checkMeta > 0) { + + if (checkPiece(mName, 4, 2, 0) && mCasing >= 64 + && checkMeta > 0 + && mInputHatches.size() >= 1 + && mOutputBusses.size() >= 1) { mLevel = checkMeta - 1; - return mLevel <= minTierOfHatch; + for (GT_MetaTileEntity_Hatch_Input inputHatch : mInputHatches) { + if (inputHatch.mTier < mLevel) { + return false; + } + } + return true; } return false; } @@ -363,7 +380,8 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase> mRecipeCompostCache = new HashMap<>(); public static void generateRecipes() { - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 15; i++) { getTieredRecipeFromCache(i, false); } - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 15; i++) { getTieredRecipeFromCache(i, true); } } -- cgit