mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Cap how much XP can be given for Roll based on damage
This commit is contained in:
parent
67a687ee40
commit
c818bf82b0
@ -5,6 +5,7 @@ Version 2.1.95
|
|||||||
Fixed a bug which could cause Large Fern's to reward less XP
|
Fixed a bug which could cause Large Fern's to reward less XP
|
||||||
Fixed a bug where certain herbalism crops could have fewer than intended bonus drops
|
Fixed a bug where certain herbalism crops could have fewer than intended bonus drops
|
||||||
Fixed a bug involving Ender Pearl and Acrobatics
|
Fixed a bug involving Ender Pearl and Acrobatics
|
||||||
|
Added some protection to Acrobatics to prevent gaining too much XP in one Roll.
|
||||||
Added 'Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart' to Herbalism in experience.yml (See notes)
|
Added 'Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart' to Herbalism in experience.yml (See notes)
|
||||||
Removed the _Ripe entries from experience.yml (no longer used)
|
Removed the _Ripe entries from experience.yml (no longer used)
|
||||||
Added missing 'Chorus_Flower' entry to herbalism in experience.yml
|
Added missing 'Chorus_Flower' entry to herbalism in experience.yml
|
||||||
|
@ -297,6 +297,9 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private float calculateRollXP(Player player, double damage, boolean isRoll) {
|
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();
|
ItemStack boots = player.getInventory().getBoots();
|
||||||
float xp = (float) (damage * (isRoll ? ExperienceConfig.getInstance().getRollXPModifier() : ExperienceConfig.getInstance().getFallXPModifier()));
|
float xp = (float) (damage * (isRoll ? ExperienceConfig.getInstance().getRollXPModifier() : ExperienceConfig.getInstance().getFallXPModifier()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user