mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Dealing with more minor typecasting issues.
This commit is contained in:
parent
0037524cfd
commit
cc044fe41b
@ -43,7 +43,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
int skillCheck = Misc.skillCheck((int)skillValue, critMaxBonusLevel);
|
int skillCheck = Misc.skillCheck((int)skillValue, critMaxBonusLevel);
|
||||||
|
|
||||||
impactDamage = String.valueOf(1 + ((double) skillValue / (double) greaterImpactIncreaseLevel));
|
impactDamage = String.valueOf(1 + ((double) skillValue / (double) greaterImpactIncreaseLevel));
|
||||||
skullSplitterLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
skullSplitterLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
greaterImpactDamage = "2";
|
greaterImpactDamage = "2";
|
||||||
|
|
||||||
if (skillValue >= critMaxBonusLevel) critChance = df.format(critMaxChance);
|
if (skillValue >= critMaxBonusLevel) critChance = df.format(critMaxChance);
|
||||||
|
@ -22,7 +22,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
gigaDrillBreakerLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
gigaDrillBreakerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,7 +43,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
DecimalFormat df = new DecimalFormat("#.0");
|
DecimalFormat df = new DecimalFormat("#.0");
|
||||||
greenTerraLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
greenTerraLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
//FARMERS DIET
|
//FARMERS DIET
|
||||||
if(skillValue >= farmersDietMaxLevel) farmersDietRank = "5";
|
if(skillValue >= farmersDietMaxLevel) farmersDietRank = "5";
|
||||||
else farmersDietRank = String.valueOf((double) skillValue / (double) farmersDietRankChange);
|
else farmersDietRank = String.valueOf((double) skillValue / (double) farmersDietRankChange);
|
||||||
|
@ -46,7 +46,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
DecimalFormat df = new DecimalFormat("#.0");
|
DecimalFormat df = new DecimalFormat("#.0");
|
||||||
superBreakerLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
superBreakerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
|
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
|
||||||
else doubleDropChance = df.format(((double) doubleDropsMaxBonus / (double) doubleDropsMaxLevel) * (double) skillValue);
|
else doubleDropChance = df.format(((double) doubleDropsMaxBonus / (double) doubleDropsMaxLevel) * (double) skillValue);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
DecimalFormat df = new DecimalFormat("#.0");
|
DecimalFormat df = new DecimalFormat("#.0");
|
||||||
serratedStrikesLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
serratedStrikesLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
|
|
||||||
if (skillValue >= bleedMaxLevel) bleedLength = String.valueOf(bleedMaxTicks);
|
if (skillValue >= bleedMaxLevel) bleedLength = String.valueOf(bleedMaxTicks);
|
||||||
else bleedLength = String.valueOf(bleedBaseTicks);
|
else bleedLength = String.valueOf(bleedBaseTicks);
|
||||||
|
@ -36,7 +36,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
DecimalFormat df = new DecimalFormat("#.0");
|
DecimalFormat df = new DecimalFormat("#.0");
|
||||||
berserkLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
berserkLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
|
|
||||||
if(skillValue >= disarmMaxLevel) disarmChance = df.format(disarmChanceMax);
|
if(skillValue >= disarmMaxLevel) disarmChance = df.format(disarmChanceMax);
|
||||||
else disarmChance = df.format(((double) disarmChanceMax / (double) disarmMaxLevel) * (double) skillValue);
|
else disarmChance = df.format(((double) disarmChanceMax / (double) disarmMaxLevel) * (double) skillValue);
|
||||||
|
@ -33,7 +33,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
DecimalFormat df = new DecimalFormat("0.0");
|
DecimalFormat df = new DecimalFormat("0.0");
|
||||||
|
|
||||||
treeFellerLength = String.valueOf(2 + ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
treeFellerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
|
||||||
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
|
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
|
||||||
else doubleDropChance = df.format(((double) doubleDropsMaxBonus / (double) doubleDropsMaxLevel) * (double) skillValue);
|
else doubleDropChance = df.format(((double) doubleDropsMaxBonus / (double) doubleDropsMaxLevel) * (double) skillValue);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ import com.gmail.nossr50.util.Users;
|
|||||||
|
|
||||||
public class SpoutStuff {
|
public class SpoutStuff {
|
||||||
private static mcMMO plugin = mcMMO.p;
|
private static mcMMO plugin = mcMMO.p;
|
||||||
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
|
|
||||||
public final static String spoutDirectory = mcMMO.getMainDirectory() + "Resources" + File.separator;
|
public final static String spoutDirectory = mcMMO.getMainDirectory() + "Resources" + File.separator;
|
||||||
public final static String hudDirectory = spoutDirectory + "HUD" + File.separator;
|
public final static String hudDirectory = spoutDirectory + "HUD" + File.separator;
|
||||||
|
Loading…
Reference in New Issue
Block a user