From 7f3fe03e5697fa4245458fb0c480d4b736e33d54 Mon Sep 17 00:00:00 2001 From: Steelux <70096037+Steelux8@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:03:19 +0100 Subject: 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 --- .../algae/GregtechMTE_AlgaePondBase.java | 10 +- .../loaders/recipe/RecipeLoader_AlgaeFarm.java | 156 +++++++++++---------- 2 files changed, 88 insertions(+), 78 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod') 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 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= 64 && checkMeta > 0) { mLevel = checkMeta - 1; - return true; + return mLevel <= minTierOfHatch; } return false; } @@ -158,10 +161,13 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase 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 aOutputMap = new AutoMap(); - - // Buff output by yielding 6-8 times more. - for (int i=0;i= 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; } } + -- cgit