diff --git a/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java index 05570eae0..c98014f78 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java @@ -41,6 +41,19 @@ public class HerbalismCommand extends SkillCommand { @Override protected void dataCalculations(Player player, float skillValue, boolean isLucky) { + + // DOUBLE DROPS + if (canDoubleDrop) { + String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.HERBALISM_DOUBLE_DROPS, isLucky); + doubleDropChance = doubleDropStrings[0]; + doubleDropChanceLucky = doubleDropStrings[1]; + } + + // FARMERS DIET + if (canFarmersDiet) { + farmersDietRank = RankUtils.getRank(player, SubSkillType.HERBALISM_FARMERS_DIET); + } + // GREEN TERRA if (canGreenTerra) { String[] greenTerraStrings = calculateLengthDisplayValues(player, skillValue); @@ -48,11 +61,6 @@ public class HerbalismCommand extends SkillCommand { greenTerraLengthEndurance = greenTerraStrings[1]; } - // FARMERS DIET - if (canFarmersDiet) { - farmersDietRank = RankUtils.getRank(player, SubSkillType.HERBALISM_FARMERS_DIET); - } - // GREEN THUMB if (canGreenThumbBlocks || canGreenThumbPlants) { greenThumbStage = RankUtils.getRank(player, SubSkillType.HERBALISM_GREEN_THUMB); @@ -62,13 +70,6 @@ public class HerbalismCommand extends SkillCommand { greenThumbChanceLucky = greenThumbStrings[1]; } - // DOUBLE DROPS - if (canDoubleDrop) { - String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.HERBALISM_DOUBLE_DROPS, isLucky); - doubleDropChance = doubleDropStrings[0]; - doubleDropChanceLucky = doubleDropStrings[1]; - } - // HYLIAN LUCK if (hasHylianLuck) { String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.HERBALISM_HYLIAN_LUCK, isLucky); @@ -99,6 +100,15 @@ public class HerbalismCommand extends SkillCommand { protected List statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) { List messages = new ArrayList(); + if (canDoubleDrop) { + messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance) + + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); + } + + if (canFarmersDiet) { + messages.add(getStatMessage(false, true, SubSkillType.HERBALISM_FARMERS_DIET, String.valueOf(farmersDietRank))); + } + if (canGreenTerra) { messages.add(getStatMessage(SubSkillType.HERBALISM_GREEN_TERRA, greenTerraLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", greenTerraLengthEndurance) : "")); @@ -116,10 +126,6 @@ public class HerbalismCommand extends SkillCommand { messages.add(getStatMessage(true, true,SubSkillType.HERBALISM_GREEN_THUMB, String.valueOf(greenThumbStage))); } - if (canFarmersDiet) { - messages.add(getStatMessage(false, true, SubSkillType.HERBALISM_FARMERS_DIET, String.valueOf(farmersDietRank))); - } - if (hasHylianLuck) { messages.add(getStatMessage(SubSkillType.HERBALISM_HYLIAN_LUCK, hylianLuckChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", hylianLuckChanceLucky) : "")); @@ -130,11 +136,6 @@ public class HerbalismCommand extends SkillCommand { + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shroomThumbChanceLucky) : "")); } - if (canDoubleDrop) { - messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance) - + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); - } - return messages; }