diff options
author | boubou19 <miisterunknown@gmail.com> | 2022-06-27 18:08:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 18:08:02 +0200 |
commit | 795de5b55714f85ffb1bf8023765c8a186070f0d (patch) | |
tree | 9cc51af091decb03e04f9ff56e847cc4d819ed65 /src/main/java/gtPlusPlus/xmod | |
parent | 0b20c29cc25229f0db5e3cf233fcdd4c2d8ddfe5 (diff) | |
download | GT5-Unofficial-795de5b55714f85ffb1bf8023765c8a186070f0d.tar.gz GT5-Unofficial-795de5b55714f85ffb1bf8023765c8a186070f0d.tar.bz2 GT5-Unofficial-795de5b55714f85ffb1bf8023765c8a186070f0d.zip |
un-nerf the TGS (#226)
* un-nerf the TGS
* switch from ordinal to enum constants
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index c5e027b740..f667ce6c28 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -144,6 +144,23 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase< return TreeFarmHelper.isValidForGUI(aStack) && !GT_ModHandler.isElectricItem(aStack) || GT_ModHandler.canUseElectricItem(aStack, 1); } + /** + * Method used to get the boost based on the ordinal of the saw + * @param sawType ordinal of the saw + * @return an int corresponding to the boost + */ + public int getSawBoost(SAWTOOL sawType){ + switch(sawType){ + case SAW: + return 1; + case BUZZSAW: + return 2; + case CHAINSAW: + return 4; + default: + return 1; + } + } public boolean checkRecipe(final ItemStack aStack) { if (aStack == null && !replaceTool()) { @@ -184,7 +201,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase< this.mEUt = (-this.mEUt); } try { - int aOutputAmount = ((2 * (tTier * tTier)) - (2 * tTier) + 5) * (mMaxProgresstime / 20) * mToolType.ordinal(); + int aOutputAmount = ((2 * (tTier * tTier)) - (2 * tTier) + 5) * (mMaxProgresstime / 20) * getSawBoost(mToolType); int aFert = hasLiquidFert(); if (aFert > 0) { //Sapling if (aFert < aOutputAmount) { |