From 680262936c89769d1e6253d71d4ca728ca293731 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 6 Nov 2017 02:46:10 +1000 Subject: % Hopefully greatly improved the structure check for the Industrial sifter. % Tweaked logging on the ASM transformer. ^ Version bump. --- .../GregtechMetaTileEntity_IndustrialSifter.java | 203 +++++++++------------ 1 file changed, 87 insertions(+), 116 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java index a6bfeab758..5fc1146bd1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java @@ -14,13 +14,13 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Machines; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -28,7 +28,7 @@ import net.minecraftforge.common.util.ForgeDirection; public class GregtechMetaTileEntity_IndustrialSifter extends GregtechMeta_MultiBlockBase { - private static boolean controller; + private boolean controller; public GregtechMetaTileEntity_IndustrialSifter(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); @@ -115,12 +115,12 @@ extends GregtechMeta_MultiBlockBase { int[] cloneChances; GT_Recipe baseRecipe; GT_Recipe cloneRecipe; - + @Override public boolean checkRecipe(final ItemStack aStack) { Utils.LOG_WARNING("1"); - + //Get inputs. final ArrayList tInputList = this.getStoredInputs(); for (int i = 0; i < (tInputList.size() - 1); i++) { @@ -135,7 +135,7 @@ extends GregtechMeta_MultiBlockBase { } } } - + Utils.LOG_WARNING("2"); //Temp var @@ -145,16 +145,16 @@ extends GregtechMeta_MultiBlockBase { if (this.mOutputBusses.size() != 4){ return false; } - - + + Utils.LOG_WARNING("3"); //Make a recipe instance for the rest of the method. final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs); - + if (tRecipe != null) - baseRecipe = tRecipe.copy(); - + baseRecipe = tRecipe.copy(); + if (cloneRecipe != tRecipe || cloneRecipe == null){ cloneRecipe = tRecipe.copy(); Utils.LOG_WARNING("Setting Recipe"); @@ -167,23 +167,23 @@ extends GregtechMeta_MultiBlockBase { cloneChances = tRecipe.mChances.clone(); Utils.LOG_WARNING("Setting Chances"); } - + for (int r=0;r35)); - + + Utils.LOG_INFO("Industrial Sifter - Structure Built? "+(tAmount>=35)); + return tAmount >= 35; } -- cgit