From e5cc06e8227da4227d70233bae023a5b018e5da1 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Fri, 28 Dec 2012 02:12:34 +0100 Subject: [PATCH] Fix for wrong datataypes --- .../com/gmail/nossr50/commands/skills/HerbalismCommand.java | 4 ++-- src/main/java/com/gmail/nossr50/skills/combat/Axes.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 72cc74f9f..7f8a657ab 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java @@ -46,10 +46,10 @@ public class HerbalismCommand extends SkillCommand { greenTerraLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); //FARMERS DIET if(skillValue >= farmersDietMaxLevel) farmersDietRank = "5"; - else farmersDietRank = String.valueOf((double) skillValue / (double) farmersDietRankChange); + else farmersDietRank = String.valueOf((int) ((double) skillValue / (double) farmersDietRankChange)); //GREEN THUMB if(skillValue >= greenThumbStageMaxLevel) greenThumbStage = "4"; - else greenThumbStage = String.valueOf((double) skillValue / (double) greenThumbStageChange); + else greenThumbStage = String.valueOf((int) ((double) skillValue / (double) greenThumbStageChange)); if(skillValue >= greenThumbMaxLevel) greenThumbChance = String.valueOf(greenThumbMaxBonus); diff --git a/src/main/java/com/gmail/nossr50/skills/combat/Axes.java b/src/main/java/com/gmail/nossr50/skills/combat/Axes.java index 37117fcdc..c09dc19b1 100644 --- a/src/main/java/com/gmail/nossr50/skills/combat/Axes.java +++ b/src/main/java/com/gmail/nossr50/skills/combat/Axes.java @@ -131,7 +131,7 @@ public class Axes { /* Every 30 Skill Levels you gain 1 durability damage */ int impactIncreaseLevel = advancedConfig.getArmorImpactIncreaseLevel(); - double impactMaxDamage = (double) advancedConfig.getArmorImpactMaxDurabilityDamage() / 100; + float impactMaxDamage = (float) advancedConfig.getArmorImpactMaxDurabilityDamage() / 100F; short maxDurability; durabilityDamage += (int) ((double) Users.getProfile(attacker).getSkillLevel(SkillType.AXES) / (double) impactIncreaseLevel);