Cap how much XP can be given for Roll based on damage

This commit is contained in:
nossr50
2019-07-07 02:07:55 -07:00
parent 67a687ee40
commit c818bf82b0
2 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,9 @@ public class Roll extends AcrobaticsSubSkill {
}
private float calculateRollXP(Player player, double damage, boolean isRoll) {
//Clamp Damage to account for insane DRs
damage = Math.min(40, damage);
ItemStack boots = player.getInventory().getBoots();
float xp = (float) (damage * (isRoll ? ExperienceConfig.getInstance().getRollXPModifier() : ExperienceConfig.getInstance().getFallXPModifier()));