From 58e506b0415abafa735aceb2f3986582aca90ffe Mon Sep 17 00:00:00 2001 From: Oaksworth <46974852+Oaksworth@users.noreply.github.com> Date: Wed, 23 Jan 2019 19:16:23 -0200 Subject: [PATCH] Update Mining to alphabetical order --- .../commands/skills/MiningCommand.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index da50512ac..ce0921aa1 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -39,20 +39,6 @@ public class MiningCommand extends SkillCommand { @Override protected void dataCalculations(Player player, float skillValue, boolean isLucky) { - // SUPER BREAKER - if (canSuperBreaker) { - String[] superBreakerStrings = calculateLengthDisplayValues(player, skillValue); - superBreakerLength = superBreakerStrings[0]; - superBreakerLengthEndurance = superBreakerStrings[1]; - } - - // DOUBLE DROPS - if (canDoubleDrop) { - String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.MINING_DOUBLE_DROPS, isLucky); - doubleDropChance = doubleDropStrings[0]; - doubleDropChanceLucky = doubleDropStrings[1]; - } - // BLAST MINING if (canBlast || canDemoExpert || canBiggerBombs) { MiningManager miningManager = UserManager.getPlayer(player).getMiningManager(); @@ -64,6 +50,20 @@ public class MiningCommand extends SkillCommand { blastDamageDecrease = percent.format(miningManager.getBlastDamageModifier() / 100.0D); blastRadiusIncrease = miningManager.getBlastRadiusModifier(); } + + // DOUBLE DROPS + if (canDoubleDrop) { + String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.MINING_DOUBLE_DROPS, isLucky); + doubleDropChance = doubleDropStrings[0]; + doubleDropChanceLucky = doubleDropStrings[1]; + } + + // SUPER BREAKER + if (canSuperBreaker) { + String[] superBreakerStrings = calculateLengthDisplayValues(player, skillValue); + superBreakerLength = superBreakerStrings[0]; + superBreakerLengthEndurance = superBreakerStrings[1]; + } } @Override @@ -79,6 +79,21 @@ public class MiningCommand extends SkillCommand { protected List statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) { List messages = new ArrayList(); + if (canBiggerBombs) { + messages.add(getStatMessage(true, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastRadiusIncrease))); + //messages.add(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease)); + } + + if (canBlast) { + messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING)), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + //messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + } + + if (canDemoExpert) { + messages.add(getStatMessage(SubSkillType.MINING_DEMOLITIONS_EXPERTISE, blastDamageDecrease)); + //messages.add(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease)); + } + if (canDoubleDrop) { messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); @@ -91,21 +106,6 @@ public class MiningCommand extends SkillCommand { //messages.add(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : "")); } - if (canBlast) { - messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING)), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); - //messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); - } - - if (canBiggerBombs) { - messages.add(getStatMessage(true, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastRadiusIncrease))); - //messages.add(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease)); - } - - if (canDemoExpert) { - messages.add(getStatMessage(SubSkillType.MINING_DEMOLITIONS_EXPERTISE, blastDamageDecrease)); - //messages.add(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease)); - } - return messages; }