mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 20:45:28 +02:00
Wire up Acrobatics XP config + PVP XP
This commit is contained in:
@@ -178,18 +178,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
reason.add(EXPERIENCE + "." + COMBAT + "." + MULTIPLIER + "." + ANIMALS + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (getDodgeXPModifier() < 0) {
|
||||
reason.add("Skills." + ACROBATICS + "." + DODGE + "_XP_" + MODIFIER + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (getRollXPModifier() < 0) {
|
||||
reason.add("Skills." + ACROBATICS + "." + ROLL + "_XP_" + MODIFIER + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFallXPModifier() < 0) {
|
||||
reason.add("Skills." + ACROBATICS + "." + FALL + "_XP_" + MODIFIER + " should be at least 0!");
|
||||
}
|
||||
|
||||
/* Fishing */
|
||||
// TODO: Add validation for each fish type once enum is available.
|
||||
|
||||
@@ -315,11 +303,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
* XP SETTINGS
|
||||
*/
|
||||
|
||||
/* General Settings */
|
||||
public boolean getExperienceGainsPlayerVersusPlayerEnabled() {
|
||||
return getBooleanValue(EXPERIENCE, PVP, REWARDS);
|
||||
}
|
||||
|
||||
/* Combat XP Multipliers */
|
||||
public double getCombatXP(EntityType entity) {
|
||||
return getDoubleValue(EXPERIENCE, COMBAT, MULTIPLIER, StringUtils.getEntityConfigName(entity));
|
||||
@@ -404,23 +387,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
return BarStyle.SOLID;
|
||||
}
|
||||
|
||||
/* Acrobatics */
|
||||
public int getDodgeXPModifier() {
|
||||
return getIntValue(EXPERIENCE, ACROBATICS, DODGE);
|
||||
}
|
||||
|
||||
public int getRollXPModifier() {
|
||||
return getIntValue(EXPERIENCE, ACROBATICS, ROLL);
|
||||
}
|
||||
|
||||
public int getFallXPModifier() {
|
||||
return getIntValue(EXPERIENCE, ACROBATICS, FALL);
|
||||
}
|
||||
|
||||
public double getFeatherFallXPModifier() {
|
||||
return getDoubleValue(EXPERIENCE, ACROBATICS, FEATHER_FALL_MULTIPLIER);
|
||||
}
|
||||
|
||||
/* Alchemy */
|
||||
public double getPotionXP(PotionStage stage) {
|
||||
return getDoubleValue(EXPERIENCE, ALCHEMY, POTION_STAGE + stage.toNumerical());
|
||||
|
@@ -119,4 +119,28 @@ public class ConfigExperience {
|
||||
public int getFallXP() {
|
||||
return experienceAcrobatics.getFallXP();
|
||||
}
|
||||
|
||||
public int getStageOnePotionXP() {
|
||||
return experienceAlchemy.getStageOnePotionXP();
|
||||
}
|
||||
|
||||
public int getStageTwoPotionXP() {
|
||||
return experienceAlchemy.getStageTwoPotionXP();
|
||||
}
|
||||
|
||||
public int getStageThreePotionXP() {
|
||||
return experienceAlchemy.getStageThreePotionXP();
|
||||
}
|
||||
|
||||
public int getStageFourPotionXP() {
|
||||
return experienceAlchemy.getStageFourPotionXP();
|
||||
}
|
||||
|
||||
public int getStageFivePotionXP() {
|
||||
return experienceAlchemy.getStageFivePotionXP();
|
||||
}
|
||||
|
||||
public boolean isPvpXPEnabled() {
|
||||
return experienceCombat.isPvpXPEnabled();
|
||||
}
|
||||
}
|
@@ -5,4 +5,6 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class ConfigExperienceArchery {
|
||||
|
||||
|
||||
|
||||
}
|
@@ -1,8 +1,20 @@
|
||||
package com.gmail.nossr50.config.hocon.experience;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigExperienceCombat {
|
||||
|
||||
private static final boolean PVP_XP_ENABLED_DEFAULT = false;
|
||||
|
||||
@Setting(value = "PVP-XP", comment = "If true, players will gain XP from PVP interactions." +
|
||||
"\nBe careful turning this on as this can potentially allow for unwanted behaviour from players." +
|
||||
"\nDefault value: "+PVP_XP_ENABLED_DEFAULT)
|
||||
private boolean pvpXPEnabled = PVP_XP_ENABLED_DEFAULT;
|
||||
|
||||
public boolean isPvpXPEnabled() {
|
||||
return pvpXPEnabled;
|
||||
}
|
||||
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.acrobatics;
|
||||
|
||||
import com.gmail.nossr50.config.hocon.skills.ConfigSubSkillScalingRNG;
|
||||
import com.gmail.nossr50.config.hocon.skills.acrobatics.dodge.ConfigDodge;
|
||||
import com.gmail.nossr50.config.hocon.skills.acrobatics.roll.ConfigRoll;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
@@ -24,4 +25,11 @@ public class ConfigAcrobatics {
|
||||
return dodge;
|
||||
}
|
||||
|
||||
public ConfigSubSkillScalingRNG getRNGSettings() {
|
||||
return dodge.getRNGSettings();
|
||||
}
|
||||
|
||||
public double getDamageReductionDivisor() {
|
||||
return dodge.getDamageReductionDivisor();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user