Przeglądaj źródła

burnTimeModifier only needs show two decimal places

TfT_02 12 lat temu
rodzic
commit
4692a461eb

+ 1 - 0
src/main/java/com/gmail/nossr50/skills/SkillCommand.java

@@ -26,6 +26,7 @@ public abstract class SkillCommand implements CommandExecutor {
     protected boolean hasEndurance;
 
     protected DecimalFormat percent = new DecimalFormat("##0.00%");
+    protected DecimalFormat decimal = new DecimalFormat("##0.00");
 
     public SkillCommand(SkillType skill) {
         this.skill = skill;

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/smelting/SmeltingCommand.java

@@ -25,7 +25,7 @@ public class SmeltingCommand extends SkillCommand {
     @Override
     protected void dataCalculations() {
         //FUEL EFFICIENCY
-        burnTimeModifier = String.valueOf(1 + ((skillValue / Smelting.burnModifierMaxLevel) * Smelting.burnTimeMultiplier));
+        burnTimeModifier = decimal.format(1 + ((skillValue / Smelting.burnModifierMaxLevel) * Smelting.burnTimeMultiplier));
 
         //SECOND SMELT
         String[] secondSmeltStrings = calculateAbilityDisplayValues(Smelting.secondSmeltMaxLevel, Smelting.secondSmeltMaxChance);