aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorSteelux <70096037+Steelux8@users.noreply.github.com>2022-06-22 23:03:19 +0100
committerGitHub <noreply@github.com>2022-06-23 00:03:19 +0200
commit7f3fe03e5697fa4245458fb0c480d4b736e33d54 (patch)
tree3dde5b640ef8ad10da5740f532bb1e48900a6858 /src/main/java/gtPlusPlus/xmod
parentad14b7e78c9f9d6a21f99a25b2896f3749720d1b (diff)
downloadGT5-Unofficial-7f3fe03e5697fa4245458fb0c480d4b736e33d54.tar.gz
GT5-Unofficial-7f3fe03e5697fa4245458fb0c480d4b736e33d54.tar.bz2
GT5-Unofficial-7f3fe03e5697fa4245458fb0c480d4b736e33d54.zip
Algae Farm Buffs and Tweaks (#213)
* Algae Farm Buffs and Tweaks - Changed the Algae Farm cycles, so that the multi works much faster but outputs less algae, in a more similar fashion to other multiblocks; - Tweaked some related recipes that were still too underpowered; - Increased the cost of Compost per tier to reinforce the decision between using it, upgrading the Algae Farm or making more; * Added Restriction to Gate Tiers Properly - Changed the machine check so that all buses/hatches have to at least match the tier of the casings in the multi for it to form correctly, preventing tier skips by using more advanced machine casings that use early materials. * Fixed Compost Consumption * Fix Multi Forming When Hatches are Changed
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java156
2 files changed, 88 insertions, 78 deletions
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 39ce7c67b2..e31047d9a0 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
@@ -46,6 +46,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
private int mCasing;
private IStructureDefinition<GregtechMTE_AlgaePondBase> STRUCTURE_DEFINITION = null;
private int checkMeta;
+ private int minTierOfHatch;
private static final Class<?> cofhWater;
static {
@@ -79,7 +80,8 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
.addInfo("Provide compost to boost production by one tier")
.addInfo("Does not require power or maintenance")
.addInfo("All Machine Casings must be the same tier, this dictates machine speed.")
- .addInfo("Fill Input Hatch with water.")
+ .addInfo("All Buses/Hatches must, at least, match the tier of the Casings")
+ .addInfo("Fill Input Hatch with Water to fill the inside of the multiblock.")
.addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(9, 3, 9, true)
@@ -145,9 +147,10 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
mCasing = 0;
mLevel = 0;
checkMeta = 0;
+ minTierOfHatch = 100;
if (checkPiece(mName, 4, 2, 0) && mCasing >= 64 && checkMeta > 0) {
mLevel = checkMeta - 1;
- return true;
+ return mLevel <= minTierOfHatch;
}
return false;
}
@@ -158,10 +161,13 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
+ minTierOfHatch = Math.min(minTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier);
return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ minTierOfHatch = Math.min(minTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier);
return addToMachineList(aTileEntity, aBaseCasingIndex);
}else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ minTierOfHatch = Math.min(minTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier);
return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java
index 053c71c89d..84aebd1465 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java
@@ -72,29 +72,30 @@ public class RecipeLoader_AlgaeFarm {
}
final int[] aDurations = new int[] {
- 432000,
- 378000,
- 216000,
- 162000,
- 108000,
- 81000,
- 54000,
- 40500,
- 27000,
- 20250,
- 13500,
- 6750,
- 3375,
- 1686,
- 843,
- 421
+ 2000,
+ 1800,
+ 1600,
+ 1400,
+ 1200,
+ 1000,
+ 512,
+ 256,
+ 128,
+ 64,
+ 32,
+ 16,
+ 8,
+ 4,
+ 2,
+ 1
};
- ItemStack[] aInputs = new ItemStack[] {};
+ ItemStack[] aInputs = new ItemStack[] {};
if (aUsingCompost) {
// Make it use 4 compost per tier if we have some available
- ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, aTier * 4);
+ // Compost consumption maxes out at 1 stack per cycle
+ ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, aTier > 1 ? (int) Math.min(64, Math.pow(2, aTier-1)) : 1);
aInputs = new ItemStack[] {aCompost};
// Boost Tier by one if using compost so it gets a speed boost
aTier++;
@@ -124,73 +125,76 @@ public class RecipeLoader_AlgaeFarm {
// Create an Automap to dump contents into
AutoMap<ItemStack> aOutputMap = new AutoMap<ItemStack>();
-
- // Buff output by yielding 6-8 times more.
- for (int i=0;i<MathUtils.randInt(4, 8);i++) {
- // Add loot relevant to tier and also add any from lower tiers.
- if (aTier >= 0) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(32, 64)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16)));
- }
+
+
+ // Add loot relevant to tier and also add any from lower tiers.
+
+ if (aTier >= 0) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 2));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 4));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 2));
}
- if (aTier >= 1) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8)));
- }
+ }
+
+ if (aTier >= 1) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 4));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 2));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 4));
+ }
+ }
+ if (aTier >= 2) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 2));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 3));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 8));
}
- if (aTier >= 2) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8)));
- }
+ }
+ if (aTier >= 3) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 4));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 1));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 4));
}
- if (aTier >= 3) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(2, 8)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(8, 16)));
- }
+ }
+ if (aTier >= 4) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 2));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 3));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 4));
}
- if (aTier >= 4) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(32, 64)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8)));
- }
+ }
+ if (aTier >= 5) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 4));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 2));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 4));
}
- if (aTier >= 5) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(1, 2)));
- }
+ }
+ // Tier 6 is Highest for outputs
+ if (aTier >= 6) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 4));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 2));
+ if (MathUtils.randInt(0, 10) > 9) {
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 8));
}
- // Tier 6 is Highest for outputs
- if (aTier >= 6) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16)));
- if (MathUtils.randInt(0, 10) > 9) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16)));
- }
+ }
+
+ // Iterate a special loop at higher tiers to provide more Red/Gold Algae.
+ for (int i2=0;i2<20;i2++) {
+ if (aTier >= (6+i2)) {
+ int aMulti = i2 + 1;
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, aMulti * 4));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, aMulti * 3));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, aMulti * 2));
+ aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, aMulti));
}
-
- // Iterate a special loop at higher tiers to provide more Red/Gold Algae.
- for (int i2=0;i2<(9-aTier);i2++) {
- if (aTier >= (6+i2)) {
- int aMulti = i2 + 1;
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti)));
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti)));
- if (MathUtils.randInt(0, 10) > 8) {
- aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16*aMulti)));
- }
- }
+ else {
+ i2 = 20;
}
}
+