diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-11 13:08:17 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-11 13:08:17 +0000 |
commit | 4a8ccf527325b4dd101cb933da31c870c41abf27 (patch) | |
tree | d7b31113bd88af75bf18652a91c037961e056ff6 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi | |
parent | 5290f9e58b8260f30a1578d02a4b5e70f94e9204 (diff) | |
download | GT5-Unofficial-4a8ccf527325b4dd101cb933da31c870c41abf27.tar.gz GT5-Unofficial-4a8ccf527325b4dd101cb933da31c870c41abf27.tar.bz2 GT5-Unofficial-4a8ccf527325b4dd101cb933da31c870c41abf27.zip |
% Updated Scanner/NC2 Panel info for all Multis. Closes #384.
% Formatting.
% Reverted structure code for LFTR and Large Electrolyzer.
% Improved tooltip of Matter Fabricator.
% Adjusted parallelism for Matter Fabricator.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi')
35 files changed, 566 insertions, 203 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java index 9f23145b23..22e41dc3d9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -272,4 +272,14 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { return 2; } + @Override + public int getMaxParallelRecipes() { + return 9; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java index 983a8204ec..adaf0fa730 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java @@ -456,5 +456,15 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); } + @Override + public int getMaxParallelRecipes() { + return 0; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + } 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 8b1a829061..5ad7e1af30 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 @@ -115,6 +115,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return this.checkRecipeGeneric(this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage()), 100, 250); } + + @Override + public int getMaxParallelRecipes() { + return (this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public void startProcess() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java index e59b7f57e9..13d94f3355 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java @@ -103,6 +103,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric(6* GT_Utility.getTier(this.getMaxInputVoltage()), 90, 125); } + + @Override + public int getMaxParallelRecipes() { + return (6 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } public Block getCasingBlock() { return ModBlocks.blockCasingsMisc; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java index 00a576f8c7..111ee89083 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java @@ -100,7 +100,17 @@ extends GregtechMeta_MultiBlockBase { @Override public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(this.mLevel * 12, (100-(GT_Utility.getTier(this.getMaxInputVoltage())*4)), 0); + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); + } + + @Override + public int getMaxParallelRecipes() { + return this.mLevel * 12; + } + + @Override + public int getEuDiscountForParallelism() { + return (100-(GT_Utility.getTier(this.getMaxInputVoltage())*4)); } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java index dc7cc659f9..c79260e9eb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java @@ -89,6 +89,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java index 7fc13c4ba5..1fb7f83428 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java @@ -121,10 +121,38 @@ extends GregtechMeta_MultiBlockBase { @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - if (mBluePrint == null) { + /*if (mBluePrint == null) { mBluePrint = new Blueprint_Electrolyzer(); } - return mBluePrint.checkMachine(aBaseMetaTileEntity); + return mBluePrint.checkMachine(aBaseMetaTileEntity);*/ + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { + return false; + } + + int tAmount = 0; + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + for (int h = -1; h < 2; h++) { + if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); + if ((!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(5)))) { + final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 5))) { + return false; + } + tAmount++; + } + } + } + } + } + return tAmount >= 10; + + } @Override @@ -146,4 +174,14 @@ extends GregtechMeta_MultiBlockBase { public boolean explodesOnComponentBreak(final ItemStack aStack) { return false; } + + @Override + public int getMaxParallelRecipes() { + return 2* GT_Utility.getTier(this.getMaxInputVoltage()); + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java index 8fc7d369bd..82714b4f73 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java @@ -124,6 +124,16 @@ extends GregtechMeta_MultiBlockBase { } return false; } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public void startProcess() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java index e2a336f3d4..9798152b8d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java @@ -111,11 +111,19 @@ extends GregtechMeta_MultiBlockBase { @Override public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 60, 7500); + } + + @Override + public int getMaxParallelRecipes() { final long tVoltage = getMaxInputVoltage(); final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - final int maxParallelRecipes = Math.max(1, 8 * tTier); + return Math.max(1, 8 * tTier); + } - return checkRecipeGeneric(maxParallelRecipes, 100, 60, 7500); + @Override + public int getEuDiscountForParallelism() { + return 100; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java index 1891da25a4..d88c6a0a45 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java @@ -128,6 +128,16 @@ extends GregtechMeta_MultiBlockBase { } return false; } + + @Override + public int getMaxParallelRecipes() { + return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public void startProcess() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java index c63b742718..827536694a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java @@ -156,6 +156,16 @@ extends GregtechMeta_MultiBlockBase { //return checkRecipeGeneric(2*GT_Utility.getTier(this.getMaxInputVoltage()), 90, 180); } + + @Override + public int getMaxParallelRecipes() { + return (2 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java index 751b74376b..9c1b53f29c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java @@ -115,6 +115,16 @@ public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_Mu } return false; } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public void startProcess() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java index fec12c79e2..ae1baa6d4e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java @@ -118,6 +118,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 400, 8800); } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java index 52a6ad0172..1ad198f3ef 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java @@ -88,6 +88,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric((8* GT_Utility.getTier(this.getMaxInputVoltage())), 80, 150); } + + @Override + public int getMaxParallelRecipes() { + return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java index 189c9a62aa..a0e6ac85ee 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java @@ -12,6 +12,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.item.ItemStack; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import gregtech.api.util.Recipe_GT; import static gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map.*; @@ -123,6 +124,16 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta public boolean checkRecipe(final ItemStack aStack) { return this.checkRecipeGeneric(4, 100, 100); } + + @Override + public int getMaxParallelRecipes() { + return 4; + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { final int xDir = ForgeDirection.getOrientation((int) aBaseMetaTileEntity.getBackFacing()).offsetX; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java index 9218334b8a..4f872ab69a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java @@ -109,6 +109,16 @@ extends GregtechMeta_MultiBlockBase { } return false; } + + @Override + public int getMaxParallelRecipes() { + return (4* GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java index bca5eebf0a..ff0571969d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java @@ -94,6 +94,16 @@ extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); } + + @Override + public int getMaxParallelRecipes() { + return (4* GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index 1c6d149c0e..6d2376fefa 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -525,5 +525,15 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase } super.onPostTick(aBaseMetaTileEntity, aTick); } + + @Override + public int getMaxParallelRecipes() { + return 8; + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java index 9c37c9384c..5d81c8693b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java @@ -147,4 +147,14 @@ extends GregtechMeta_MultiBlockBase { return false; } + @Override + public int getMaxParallelRecipes() { + return (GT_Utility.getTier(this.getMaxInputVoltage())/2+1); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + }
\ No newline at end of file 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 135b31c616..535bfa6880 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 @@ -278,8 +278,18 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { } else if (mMachineMode == MODE.CRAFTING) { return doCrafting(aStack); } else { - return super.checkRecipeGeneric(tTier * 2, 100, 200); + return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200); } + } + + @Override + public int getMaxParallelRecipes() { + return 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; } public boolean doDisassembly() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java index 45a8740ad1..b3a5358bf0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -120,6 +120,16 @@ extends GregtechMeta_MultiBlockBase this.mMaxProgresstime = 0; this.mEUt = 0; return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java index b8d4ba3092..f7871ed1f9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java @@ -8,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import net.minecraft.item.ItemStack; @@ -86,6 +87,16 @@ extends GregtechMeta_MultiBlockBase //Stage 1 } return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } public boolean processing_Stage_1() { //Deplete Water, Add More Progress Time diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java index 24a5c9cea7..156e69ce03 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java @@ -116,6 +116,16 @@ public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(ItemStack aStack) { return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java index bcd1fe941b..984fc53604 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java @@ -18,6 +18,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import gregtech.api.util.Recipe_GT; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; @@ -139,129 +140,120 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase { private Blueprint_LFTR mBlueprint; @Override - public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - - if (mBlueprint == null) { - mBlueprint = new Blueprint_LFTR(); - } - return mBlueprint.checkMachine(aBaseMetaTileEntity); - - - /* + public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + + // Life Lessons from Greg. + /** + [23:41:15] <GregoriusTechneticies> xdir and zdir are x2 and not x3 + [23:41:26] <GregoriusTechneticies> thats you issue + [23:44:33] <Alkalus> mmm? + [23:44:49] <Alkalus> Should they be x3? + [23:44:50] <GregoriusTechneticies> you just do a x2, what is for a 5x5 multiblock + [23:45:01] <GregoriusTechneticies> x3 is for a 7x7 one + [23:45:06] <Alkalus> I have no idea what that value does, tbh.. + [23:45:15] <GregoriusTechneticies> its the offset + [23:45:23] <Alkalus> Debugging checkMachine has been a pain and I usually trash designs that don't work straight up.. + [23:45:28] <GregoriusTechneticies> it determines the horizontal middle of the multiblock + [23:45:47] <GregoriusTechneticies> which is in your case THREE blocks away from the controller + [23:45:51] <Alkalus> Ahh + [23:45:57] <GregoriusTechneticies> and not 2 + [23:46:06] <Alkalus> Noted, thanks :D + */ + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; + + for (int i = -3; i <= 3; i++) { + for (int j = -3; j <= 3; j++) { + for (int h = 0; h < 4; h++) { + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); + + // Reactor Floor/Roof inner 5x5 + if (((i != -3) && (i != 3)) && ((j != -3) && (j != 3))) { + + // Reactor Floor & Roof (Inner 5x5) + Mufflers, Dynamos and Fluid outputs. + if ((h == 0) || (h == 3)) { + + //If not a hatch, continue, else add hatch and continue. + if ((!this.addMufflerToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + return false; + } + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing."); + return false; + } + } + } - + // Inside 2 layers, mostly air + else { - // Life Lessons from Greg. - *//** - [23:41:15] <GregoriusTechneticies> xdir and zdir are x2 and not x3 - [23:41:26] <GregoriusTechneticies> thats you issue - [23:44:33] <Alkalus> mmm? - [23:44:49] <Alkalus> Should they be x3? - [23:44:50] <GregoriusTechneticies> you just do a x2, what is for a 5x5 multiblock - [23:45:01] <GregoriusTechneticies> x3 is for a 7x7 one - [23:45:06] <Alkalus> I have no idea what that value does, tbh.. - [23:45:15] <GregoriusTechneticies> its the offset - [23:45:23] <Alkalus> Debugging checkMachine has been a pain and I usually trash designs that don't work straight up.. - [23:45:28] <GregoriusTechneticies> it determines the horizontal middle of the multiblock - [23:45:47] <GregoriusTechneticies> which is in your case THREE blocks away from the controller - [23:45:51] <Alkalus> Ahh - [23:45:57] <GregoriusTechneticies> and not 2 - [23:46:06] <Alkalus> Noted, thanks :D - *//* - - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; - - for (int i = -3; i <= 3; i++) { - for (int j = -3; j <= 3; j++) { - for (int h = 0; h < 4; h++) { - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); - - // Reactor Floor/Roof inner 5x5 - if (((i != -3) && (i != 3)) && ((j != -3) && (j != 3))) { - - // Reactor Floor & Roof (Inner 5x5) + Mufflers, Dynamos and Fluid outputs. - if ((h == 0) || (h == 3)) { - - //If not a hatch, continue, else add hatch and continue. - if ((!this.addMufflerToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3."); - Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing."); + // Reactor Inner 5x5 + //if ((i != -1 && i != 1) && (j != -1 && j != 1)) { + if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) { + Logger.INFO("Make sure the inner 3x3 of the Multiblock is Air."); return false; } - } - } - // Inside 2 layers, mostly air - else { - - // Reactor Inner 5x5 - //if ((i != -1 && i != 1) && (j != -1 && j != 1)) { - if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) { - Logger.INFO("Make sure the inner 3x3 of the Multiblock is Air."); - return false; } + //TODO - Add Carbon Moderation Rods + /* + else { //carbon moderation rods are at 1,1 & -1,-1 & 1,-1 & -1,1 + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { + Utils.LOG_WARNING("LFTR Casing(s) Missing from one of the top layers inner 3x3."); + Utils.LOG_WARNING("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + return false; + } + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { + Utils.LOG_WARNING("LFTR Casing(s) Missing from one of the top layers inner 3x3."); + return false; + } + }*/ + } - //TODO - Add Carbon Moderation Rods - - else { //carbon moderation rods are at 1,1 & -1,-1 & 1,-1 & -1,1 + //Dealt with inner 5x5, now deal with the exterior. + else { + + //Deal with all 4 sides (Reactor walls) + if ((h == 1) || (h == 2)) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Utils.LOG_WARNING("LFTR Casing(s) Missing from one of the top layers inner 3x3."); - Utils.LOG_WARNING("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Utils.LOG_WARNING("LFTR Casing(s) Missing from one of the top layers inner 3x3."); + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) { + Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } } - } + //Deal with top and Bottom edges (Inner 5x5) + else if ((h == 0) || (h == 3)) { + if ((!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) { + if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller - //Dealt with inner 5x5, now deal with the exterior. - else { - - //Deal with all 4 sides (Reactor walls) - if ((h == 1) || (h == 2)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); - Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) { - Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); - Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); - return false; - } - } - - //Deal with top and Bottom edges (Inner 5x5) - else if ((h == 0) || (h == 3)) { - if ((!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) { - if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller - - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer."); - Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h); - Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); - if (h ==0){ - if (tTileEntity instanceof GregtechMTE_NuclearReactor){ + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + return false; + } + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + if (h ==0){ + if (tTileEntity instanceof GregtechMTE_NuclearReactor){ + } + } + else { + return false; } - } - else { - return false; } } } @@ -270,69 +262,68 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase { } } } - } - - if (this.mDynamoHatches != null) { - for (int i = 0; i < this.mDynamoHatches.size(); i++) { - if (this.mDynamoHatches.get(i).mTier < 5){ - Logger.INFO("You require at LEAST IV tier Dynamo Hatches."); - Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - return false; + + if (this.mDynamoHatches != null) { + for (int i = 0; i < this.mDynamoHatches.size(); i++) { + if (this.mDynamoHatches.get(i).mTier < 5){ + Logger.INFO("You require at LEAST IV tier Dynamo Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + return false; + } } } - } - if (this.mOutputHatches != null) { - for (int i = 0; i < this.mOutputHatches.size(); i++) { - - if ((this.mOutputHatches.get(i).mTier < 5) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){ - Logger.INFO("You require at LEAST IV tier Output Hatches."); - Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); - return false; + if (this.mOutputHatches != null) { + for (int i = 0; i < this.mOutputHatches.size(); i++) { + + if ((this.mOutputHatches.get(i).mTier < 5) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){ + Logger.INFO("You require at LEAST IV tier Output Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + return false; + } } } - } - if (this.mInputHatches != null) { - for (int i = 0; i < this.mInputHatches.size(); i++) { - if (this.mInputHatches.get(i).mTier < 5){ - Logger.INFO("You require at LEAST IV tier Input Hatches."); - Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); - return false; + if (this.mInputHatches != null) { + for (int i = 0; i < this.mInputHatches.size(); i++) { + if (this.mInputHatches.get(i).mTier < 5){ + Logger.INFO("You require at LEAST IV tier Input Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + return false; + } } } - } - if (this.mMufflerHatches.size() != 4){ - Logger.INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size()); - return false; - } - if (this.mInputHatches.size() < 4){ - Logger.INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size()); - return false; - } - if (this.mOutputHatches.size() < 10){ - Logger.INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size()); - return false; - } - if (this.mDynamoHatches.size() != 4){ - Logger.INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size()); - return false; - } - if (this.mMaintenanceHatches.size() != 2){ - Logger.INFO("You require EXACTLY 2 Maint. hatches. TWO. You have "+this.mMaintenanceHatches.size()); - return false; - } - this.mWrench = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mHardHammer = true; - this.mSolderingTool = true; - this.mCrowbar = true; - this.turnCasingActive(false); - Logger.INFO("Multiblock Formed."); - return true; - */} + if (this.mMufflerHatches.size() != 4){ + Logger.INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size()); + return false; + } + if (this.mInputHatches.size() < 4){ + Logger.INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size()); + return false; + } + if (this.mOutputHatches.size() < 10){ + Logger.INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size()); + return false; + } + if (this.mDynamoHatches.size() != 4){ + Logger.INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size()); + return false; + } + if (this.mMaintenanceHatches.size() != 2){ + Logger.INFO("You require EXACTLY 2 Maint. hatches. TWO. You have "+this.mMaintenanceHatches.size()); + return false; + } + this.mWrench = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mHardHammer = true; + this.mSolderingTool = true; + this.mCrowbar = true; + this.turnCasingActive(false); + Logger.INFO("Multiblock Formed."); + return true; + } @Override public boolean isCorrectMachinePart(final ItemStack aStack) { @@ -547,6 +538,16 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase { this.mEUt = 0; this.mEfficiency = 0; return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java index 33f1b9dad7..7378c818f6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java @@ -259,4 +259,14 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc public int getAmountOfOutputs() { return 1; } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index af106951cf..769225ff46 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -10,6 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.block.ModBlocks; @@ -261,6 +262,16 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase return true; } return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java index 1a78824925..ccb16bc69c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java @@ -205,6 +205,16 @@ extends GregtechMeta_MultiBlockBase { } Logger.WARNING("Failed to find some Valid Inputs or Clientside."); return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index 2ef681de33..aead58574d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -355,6 +355,16 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas } } return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java index 034ad323d9..3afa8d84c3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java @@ -139,6 +139,16 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M } return true; } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java index d4cd08cf44..d34355902a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java @@ -16,13 +16,11 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; import gregtech.api.util.Recipe_GT; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MatterFab; @@ -47,6 +45,10 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo private int mAmplifierProduced = 0; private int mScrapUsed = 0; private int mAmplifierUsed = 0; + + public static String mCasingName1 = "Matter Fabricator Casing"; + public static String mCasingName2 = "Containment Casing"; + public static String mCasingName3 = "Matter Generation Coil"; private int mMode = 0; @@ -56,7 +58,6 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo public static boolean sRequiresUUA = false; private static FluidStack[] mUU = new FluidStack[2]; private static ItemStack mScrap[] = new ItemStack[2]; - private static Block IC2Glass = Block.getBlockFromItem(ItemUtils.getItem("IC2:blockAlloyGlass")); public int getAmplifierUsed(){ return this.mAmplifierUsed; @@ -68,37 +69,49 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo public GregtechMetaTileEntity_MassFabricator(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); } public GregtechMetaTileEntity_MassFabricator(final String aName) { super(aName); + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); } @Override public String getMachineType() { - return "Mass Fabricator"; + return "Mass Fabricator / Recycler"; } @Override public String[] getTooltip() { + + if (mCasingName1.toLowerCase().contains(".name")) { + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + } + if (mCasingName2.toLowerCase().contains(".name")) { + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + } + if (mCasingName3.toLowerCase().contains(".name")) { + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); + } + return new String[]{ "Controller Block for the Matter Fabricator", - "Produces UU-Matter from UU-Amplifier", - "Use numbered circuits in GUI slot to change mode", - "[19] Junk Items to Scrap", - "[20] Junk Items to UU-A", - "[21] Scrap to UU-A", - "[22] Produce UU-M", + "Produces UU-A, UU-m & Scrap", "Size(WxHxD): 5x4x5, Controller (Bottom center)", - "3x1x3 Matter Generation Coils (Inside bottom 5x1x5 layer)", - "9x Matter Generation Coils (Centered 3x1x3 area in Bottom layer)", + "3x1x3 "+mCasingName3+"s (Inside bottom 5x1x5 layer)", + "9x "+mCasingName3+" (Centered 3x1x3 area in Bottom layer)", "1x Input Hatch (Any bottom layer casing)", "1x Output Hatch (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Centered 3x1x3 area in Top layer)", "1x Energy Hatch (Any bottom layer casing)", - "24x IC2 Reinforced Glass for the walls", - "Matter Fabricator Casings for the edges & top (40 at least!)", + "24x "+mCasingName2+" for the walls", + mCasingName1+"s for the edges & top (40 at least!)", }; } @@ -386,31 +399,21 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo return true; } - return super.checkRecipeGeneric(c, 32, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); + return super.checkRecipeGeneric(c, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll); } //Return normal Recipe handling - return super.checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); - } + return super.checkRecipeGeneric(aItemInputs, aFluidInputs, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll); + } - private GT_Recipe generateScrapRecipe(ItemStack[] aInputs) { - if (aInputs.length < 1) { - return null; - } - else { - AutoMap<ItemStack> aInputsFiltered = new AutoMap<ItemStack>(); - ItemStack circuit = CI.getNumberedCircuit(1); - for (ItemStack f : aInputs) { - if (f == null || f.getItem() == circuit.getItem()) { - continue; - } - } - - - } - - - return null; + @Override + public int getMaxParallelRecipes() { + return this.mMode == MODE_SCRAP ? 32 : 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java index fe435490a2..56d00a330f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java @@ -105,7 +105,17 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase } } return false; - } + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java index 2621d9e807..5d443d0a5f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java @@ -13,6 +13,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.block.ModBlocks; @@ -156,6 +157,16 @@ extends GregtechMeta_MultiBlockBase { //this.mMaxProgresstime = 100; //this.mEUt = -4; return true; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java index 575e8d9b73..2b2a70e926 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java @@ -630,5 +630,14 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM return aUpdated; } + @Override + public int getMaxParallelRecipes() { + return 1; + } + @Override + public int getEuDiscountForParallelism() { + return 0; + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java index 4fdfc74c90..b90cf8910a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java @@ -391,6 +391,16 @@ extends GregtechMeta_MultiBlockBase { //this.getBaseMetaTileEntity().(tFluids[0].amount, true); Logger.WARNING("Tank"); return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index ea3c44ea7d..5addd5c5b6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -375,6 +375,16 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe this.mEfficiencyIncrease = 10000; return true; } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } private void drawEnergyFromHatch(MetaTileEntity aHatch) { if (!isValidMetaTileEntity(aHatch)) return; |