aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
diff options
context:
space:
mode:
authorbotn365 <42187820+botn365@users.noreply.github.com>2020-01-15 18:23:46 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2020-01-15 17:23:46 +0000
commit94fca1f87278cd9ae377b4d7dad3d04237e697cc (patch)
treeaf0d49d9e962cf2b1f3388fc640c062d74b741f4 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
parentc5189e5888e6d3452f7ce05952f21cfe21ed491a (diff)
downloadGT5-Unofficial-94fca1f87278cd9ae377b4d7dad3d04237e697cc.tar.gz
GT5-Unofficial-94fca1f87278cd9ae377b4d7dad3d04237e697cc.tar.bz2
GT5-Unofficial-94fca1f87278cd9ae377b4d7dad3d04237e697cc.zip
> Fixes from #610
$ Fix Large Arc Furnace not forming and broken size detection. Closes #572. % Changed Large Auto-Assembler input bus Behaviour for Circuit/Assembly mode. Closes #559.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java46
2 files changed, 47 insertions, 13 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
index c549cf9216..68e060c778 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
@@ -137,13 +137,13 @@ extends GregtechMeta_MultiBlockBase {
int depth = 1;
int mPlascreteCount = 0;
for (int i = 1; i < 4; i++) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0);
- int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0);
- if (tBlock == ModBlocks.blockCasings3Misc && tMeta == 1) {
- Logger.INFO("Found Correct Top Casing at offset "+i);
+ if (aBaseMetaTileEntity.getAirOffset(i, -1, 0)) {
+ Logger.INFO("aitfound "+i);
continue;
}
- else {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, -1, 0);
+ int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, -1, 0);
+ {
if (isValidCasingBlock(tBlock, tMeta)) {
x = i;
z = i;
@@ -176,7 +176,7 @@ extends GregtechMeta_MultiBlockBase {
}
//!addToMachineList(tTileEntity, mCasingTextureID)
if (depth >= -1) {
- Logger.INFO("Structure is not 5 blocks or taller.");
+ Logger.INFO("Structure is not 5 blocks or taller. depth = "+depth);
return false;
}
@@ -207,7 +207,7 @@ extends GregtechMeta_MultiBlockBase {
}
else if (dY < 0) {
//Check Walls
- if (dX == -x || dX == x || dZ == -z || dZ == z) {
+ if (dY != depth && (dX == -x || dX == x || dZ == -z || dZ == z)) {
if (!isValidCasingBlock(tBlock, tMeta) && !addToMachineList(tTileEntity, mCasingTextureID)) {
Logger.INFO("Found Incorrect Wall Casing at offset X:"+dX+" | Y:"+dY+" | Z:"+dZ);
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
index f24825ba8a..9754eebbb8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
@@ -33,6 +33,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech
import gtPlusPlus.xmod.gregtech.common.helpers.CraftingHelper;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils;
import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
@@ -269,20 +270,53 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
}
}
+// @Override
+// public boolean checkRecipe(final ItemStack aStack) {
+//
+// final long tVoltage = this.getMaxInputVoltage();
+// final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+//
+// if (mMachineMode == MODE.DISASSEMBLY) {
+// return doDisassembly();
+// } else if (mMachineMode == MODE.CRAFTING) {
+// return doCrafting(aStack);
+// } else {
+// return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200);
+// }
+// }
+
@Override
public boolean checkRecipe(final ItemStack aStack) {
-
- final long tVoltage = this.getMaxInputVoltage();
- final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
if (mMachineMode == MODE.DISASSEMBLY) {
return doDisassembly();
} else if (mMachineMode == MODE.CRAFTING) {
return doCrafting(aStack);
} else {
- return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200);
+ ArrayList<FluidStack> tFluids = getStoredFluids();
+ //Logger.MACHINE_INFO("1");
+ for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) {
+ ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>();
+ tBus.mRecipeMap = getRecipeMap();
+ //Logger.MACHINE_INFO("2");
+ if (isValidMetaTileEntity(tBus)) {
+ //Logger.MACHINE_INFO("3");
+ for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null)
+ tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+
+ Object[] tempArray = tFluids.toArray(new FluidStack[] {});
+ FluidStack[] properArray;
+ properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {});
+
+ //Logger.MACHINE_INFO("4");
+ if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray,
+ getMaxParallelRecipes(), 100, 200, 10000)) return true;
+ }
+ return false;
}
- }
+ }
@Override
public int getMaxParallelRecipes() {